Im trying to respawn, only a few, units when they die at their starting position. Is there one that only respawns certain units for a player, easy to use, and is compatible with Unit Indexer? (doesn't use Unit custom values)
why dont just save unit x, y coordinate to global real variables when its indexed?
so use indexing system and make a x,y real check
- indexer trigger
- Events
- Game - UnitIndexEvent becomes Equal to 1.00
- Conditions
- Actions
- Custom script: set udg_X[udg_UDex] = GetUnitX(udg_UDexUnits[udg_UDex])
- Custom script: set udg_Y[udg_UDex] = GetUnitY(udg_UDexUnits[udg_UDex])
if u sue custom script for unit create then dont even need set p and removelocation
- respawn
- Events
- Unit - A unit Dies
- Conditions
- Actions
- Set CV = (Custom value of (Triggering unit))
- Custom script: if udg_X[udg_CV] == GetUnitX(GetTriggerUnit()) and udg_Y[udg_CV] == GetUnitY(GetTriggerUnit()) then
- Set p = (Position of (Triggering unit))
- Unit - Create 1 Footman for Player 1 (Red) at p facing Default building facing degrees
- Custom script: call RemoveLocation(udg_p)
- Custom script: endif
Because i want to index where they START, not when they die..? I can easily just do position of dying unit for that
its do that its give the start position, actually when unit enter to ur map it is indexed and that moment get his x/y value and not when he die
when he die u just check if start position==dieing position or no like i wrote
Thanks for trying i guess, i just used the unit indexer value rather than custom value