[Solved] last created thing with CreateDestructableZ ?

Status
Not open for further replies.
Level 27
Joined
Oct 18, 2008
Messages
955
with GUI lacking a way to create destructibles at a height I've used this custom script. so far it worked but a related problem has presented itself.

  • (Destructible - (Last created destructible)
does not refer to things created this way. I assume I will need another script to refer to it.

simply put, I need

  • Trigger - Add to shrubadd <gen> the event (Destructible - (Last created destructible) dies)
but with the correct reference.
 
The GUI actions to create objects look roughly like this in Jass:
JASS:
set bj_lastCreatedUnit = CreateUnit(...)
return bj_lastCreatedUnit
Last created unit is not something that gets automatically assigned to the last created unit. Instead the variable is set in the actions. If you want to store your last created destructible you need to do: set yourVariable=CreateDestructible(...) instead of call CreateDestructible()
You can use set bj_lastCreatedDestructable = CreateDestructible(...), because bj_lastCreatedDestructable is "Last Created Destructible".
 
Status
Not open for further replies.
Back
Top