I have a small issue with a trigger I'm trying to make.
I have a trigger001 to spawn unit001.
I have a trigger002 to spawn stuff from unit001 after trigger001 is triggered.
I want it so that trigger002 is disabled upon the death of unit001. Previously I simply used the "unit dies" event, but since unit001 is created through trigger001, I have no idea how to get it to work. I believe it has something to do with variables?
Yes, you simply save unit001 as a variable. Create a variable (We'll call it SavedUnit) with type unit. In trigger001 after creating the unit, set variable SavedUnit to LastCreatedUnit(). You can use "Unit Dies" events from there.
Yes, you simply save unit001 as a variable. Create a variable (We'll call it SavedUnit) with type unit. In trigger001 after creating the unit, set variable SavedUnit to LastCreatedUnit(). You can use "Unit Dies" events from there.
also in that trigger make a condition that the "savedUnit" var !== null (or undefined) w/e they call it in .galaxy
Rollback Post to RevisionRollBack
Random Information
Tutorials - Map Development - Galaxy wiki
|Issues? PM me|
I have a small issue with a trigger I'm trying to make.
I have a trigger001 to spawn unit001.
I have a trigger002 to spawn stuff from unit001 after trigger001 is triggered.
I want it so that trigger002 is disabled upon the death of unit001. Previously I simply used the "unit dies" event, but since unit001 is created through trigger001, I have no idea how to get it to work. I believe it has something to do with variables?
I'd appreciate any kind of help.
@WontonST: Go
Yes, you simply save unit001 as a variable. Create a variable (We'll call it SavedUnit) with type unit. In trigger001 after creating the unit, set variable SavedUnit to LastCreatedUnit(). You can use "Unit Dies" events from there.
also in that trigger make a condition that the "savedUnit" var !== null (or undefined) w/e they call it in .galaxy
You can also cause a unit to spawn other units in the Data Editor. The Hatchery is a good example of it.