| 11-11-2004, 04:24 PM | #1 |
i've made a unit with 500 heights then use the animation - change unit flying height and then kill it once it reached 0 height. how do i make trigger to kill that unit once it reached height 0? ps : srry for my poor english |
| 11-11-2004, 04:38 PM | #2 |
How is the height changed to 0 after? Is it changed in another trigger? If so, for example if you have a variable to permanently decrease the height, check the variable in the trigger where you change the height... if VARIABLE is equal to 0 then - Kill UNIT I hope this helps. |
| 11-11-2004, 05:23 PM | #3 |
Guest | Code:
·Events Periodic - Every (X) game seconds ·Conditions (none) ·Actions If <(Your Unit)'s Flying Height equal to 0>, then do <Unit - Kill (Your Unit)>, else do (Nothing) If I understood you right, that's what I would make. Set the seconds of periodic event to a low value, but sont make it every 0.01 seconds or so to avoid lag. Hope that helps. Salutions® |
| 11-11-2004, 06:50 PM | #4 |
can you show the trigger which makes the unit animation? that would help alot. are you using any vars? |
| 11-11-2004, 07:17 PM | #5 |
OR, in the origional trigger, add 'wait for condition (flying height of UNIT) is equal to 0' then 'kill UNIT'. |
| 11-13-2004, 01:32 PM | #6 |
my trigger looks like: event: every 0.50 secons of game time conditions: none actions: - unit - create 1 dragonhawk rider for player 1 (Red) at Center of Region 001<gen> facing default building facing degrees - animation - change (Last created unit) flying height to 0.00 at 2000.00 - wait 0.30 seconds - Unit Group - Pick every unit in (Units owned by Player 1 (Red) of type Dragonhawk Rider) and do (Actions) Loop - Actions Unit - Remove (Picked unit) from the game ....what to do? |
