Ok, so I have this unit in my map that gets revived after it dies (The trigger for the revive mechanic is in place and works) and I want to make it so that each time the unit is revived it is revived in one of 8 locations/Points randomly. How can I make a trigger for that?
Thanks :)
P.S.: I used Points for my revive mechanic, not buildings. Based on this
Ok, so now ... is there a way to make that unit respawn in one of those areas, but that he can't spawn in the same area that he was in when he died. So as an example: Super Dude Man explores a Cave, dies, gets respawned on a Beach or any other region, but not in the Cave. Then he explores the Beach and dies and gets respawned in one of the 8 locations (including the Cave now), but not on the Beach, etc.
Create another array that mimics the pointArray of the areas. Except its a boolean this time.
i.e,
Dude dies in cave (pointArrayBoolean[integer of first array where the dude died] = true) - Sets the boolean for the specified area to true
Dude spawns anywhere BUT the cave (pointArrayBoolean[integer of first array where dude died] = false) - Resets the boolean to the area he died in before spawning
Happens again at a different area, but will not spawn at the same area he died in.
Ok, so I have this unit in my map that gets revived after it dies (The trigger for the revive mechanic is in place and works) and I want to make it so that each time the unit is revived it is revived in one of 8 locations/Points randomly. How can I make a trigger for that?
Thanks :)
P.S.: I used Points for my revive mechanic, not buildings. Based on this
save the points in an pointArray[7] variable (0..7). then move the unit to pointArray[random integer from 0..7].
Woohoo! It works :D Thanks Funky :)
Ok, so now ... is there a way to make that unit respawn in one of those areas, but that he can't spawn in the same area that he was in when he died. So as an example: Super Dude Man explores a Cave, dies, gets respawned on a Beach or any other region, but not in the Cave. Then he explores the Beach and dies and gets respawned in one of the 8 locations (including the Cave now), but not on the Beach, etc.
Create another array that mimics the pointArray of the areas. Except its a boolean this time. i.e, Dude dies in cave (pointArrayBoolean[integer of first array where the dude died] = true) - Sets the boolean for the specified area to true Dude spawns anywhere BUT the cave (pointArrayBoolean[integer of first array where dude died] = false) - Resets the boolean to the area he died in before spawning Happens again at a different area, but will not spawn at the same area he died in.
Nice! Thanks sh1ftsw1tf :)