Crates appearing after destroying a building

Information and discussion for custom maps and mods.
Post Reply
Dasha
Posts: 29
Joined: Sat Oct 24, 2015 11:28 am

Crates appearing after destroying a building

Post by Dasha »

Hi,

I've created this skirmish map, and have a question.
Is it possible to :
1. Make a crate appear after a particular civilian building is destroyed ?
2. If so, is it possible to force what it'll contain ?

Dasha.

abcdefg30
Posts: 562
Joined: Mon Aug 18, 2014 6:00 pm

Re: Crates appearing after destroying a building

Post by abcdefg30 »

Hi. Yes, it is doable. You will have to create a new actor for the civilian building (duplicate the existing one) and add "SpawnActorOnDeath:" to it (I suggest looking at https://docs.openra.net/en/release/traits/ and the existing default rule definitions for how to use it). Then create a new crate actor with just the crate action you want it to trigger, and make SpawnActorOnDeath spawn that new crate actor.

Dasha
Posts: 29
Joined: Sat Oct 24, 2015 11:28 am

Re: Crates appearing after destroying a building

Post by Dasha »

Thanks, I'll check this !

Post Reply