| 04-08-2004, 12:32 AM | #1 |
I made a trigger so in my open RPG the unit thats is slain will respawn where they were when they died my trigger looks like this. Event Unit - A unit owned by Player 9 (Gray) Dies Actions Wait 30.00 seconds Unit - Create 1 (Unit-type of (Dying unit)) for Player 9 (Gray) at (Position of (Dying unit)) facing Default building facing (270.0) degrees Now the problem with this is it does not remove the corpses so I did this. Event Unit - A unit owned by Player 9 (Gray) Dies Actions Wait 30.00 seconds Unit - Create 1 (Unit-type of (Dying unit)) for Player 9 (Gray) at (Position of (Dying unit)) facing Default building facing (270.0) degrees Unit - Remove (Dying unit) from the game But when I do this after the creature respawns hes removed from the game. Any suggestions so improve this trigger or create another. Thanks ^_^ |
| 04-08-2004, 05:55 AM | #2 | |
Quote:
you may also want to make a unit variable array and set it for the dying unit if you have more than 1 player and a dummy placement unit. The Dying unit is the last dying unit. You will only create the last dying unit. What I mean by that is if player 9 (gray) dies in your trigger you are waiting 30 seconds. If any unit dies before the 30 seconds expires the newest dying unit is what you will create. give the dummy placement unit no model(.mdl as custom model), 0 collision size and the invulnerable (neutral hostile) skill. An example would be set DYING_UNIT_PLAYER9 = (Dying Unit) Unit - Create 1 (Unit-type of (DUMMY_UNIT)) for Player 9 (Gray) at (Position of (DYING_UNIT_PLAYER9)) facing Default building facing (270.0) degrees Unit - Remove (DYING_UNIT_PLAYER9) from the game Wait 30.00 seconds Unit - Create 1 (Unit-type of (DYING_UNIT_PLAYER9)) for Player 9 (Gray) at (Position of (DUMMY_UNIT)) facing Default building facing (270.0) degrees Unit - Remove (DUMMY_UNIT) from the game |
