Yoshimoto said:
Couldn't you just make it simpler?
Event:
Unit - Dies
Condition:
Either
Unit - Type equal to <UNIT TYPE>
Or
Unit - Triggering unit equal to <UNIT HERE>
Or
Owned by player (Neutral Hostile) condition.
Action:
Unit - Create 1 <Unit>
If need be just add some Give Item to hero triggers if you want them to have items or just add an extra trigger for a death drop. Not much simpler but should do it anyway.
normally its really quite simple to re create a dying unit.
but there is some annoying issues:
- When your hero kills the unit, the unit is respawning at same time and you need to kill it again and again. This will couse stacking at one point. and will be boring
- If you dont store the unit's position at somewhere, you need to create loads of regions and loads of triggers that controls that tingie
a unit dies in region bla bla or,
number of living units at region bla bla,
Create another unit ect...
however if unit has moved from this region your code does not work or create bilions of more units ect...
to make this kinda script perfect you need more complicated one then above
- with this code, you cannot create spesific actions like moving units or patroling like FFopenRPG
- the code that i wrote is creating a timer when a unit dies, and when timer finishes respawns this unit at same place when it stored first... If you modify your code your unit will respawn where it dies...
Simply, thats the simplest and the most perfect code that i can find around God bless JASS and Ryoko
