| 11-26-2003, 04:00 AM | #1 |
I am trying to create a pretty long trigger that will do something like this: When a unit (equal to hero) enters a region, a portal will be spawned (when I did it, the portal was instantly created, I want the portal to show its birth animation) facing certain degrees. Then after a few seconds a unit will spawn from the portal (or at least appear so) and move to a certain location also facing certain degrees. I want to have the blink effect to show up when this happens After about 15 seconds of being spawned the portal will die, then after about 120 seconds, the unit that came out of the portal will also die. Events Unit - A unit enters Rune Switch <gen> Conditions ((Triggering unit) is A Hero) Equal to True Actions Unit - Create 1 Portal for Player 1 (Red) at (Center of Portal <gen>) facing 100.00 degrees Wait 9.00 seconds Special Effect - Create a special effect at (Center of Portal <gen>) using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl Unit - Create 1 Morugal The Warlock for Neutral Passive at (Center of Portal <gen>) facing 100.00 degrees Wait 2.00 seconds Unit - Order (Last created unit) to Move To (Center of Morugal Rune <gen>) Unit - Move (Last created unit) instantly to (Center of Morugal Rune <gen>), facing 225.00 degrees I am new with triggers, and this doesn't work how I want it at all Any help? |
| 11-26-2003, 05:36 AM | #2 | |
Quote:
Make the following changes and additions: Events Unit - A unit enters Rune Switch <gen> Conditions ((Entering Unit) is A Hero) Equal to True Actions Unit - Create 1 Portal for Player 1 (Red) at (Center of Portal <gen>) facing 100.00 degrees Play (last created unit)'s birth animation Set var(portal) to (last created unit) Wait 9.00 seconds Special Effect - Create a special effect at (Center of Portal <gen>) using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl Unit - Create 1 Morugal The Warlock for Neutral Passive at (Center of Portal <gen>) facing 100.00 degrees Set var(warlock) to (last created unit) Wait 2.00 seconds Unit - Move var(warlock) instantly to (Center of Morugal Rune <gen>), facing 225.00 degrees Special Effect - Create a special effect at (Position of var(warlock)) using Abilities\Spells\NightElf\Blink\BlinkCaster.mdl Wait 13.00 seconds Play var(portal)'s death animation Wait 4.00 seconds Remove var(portal) from the game Wait 101.00 seconds Kill var(warlock) The var(portal) and car(warlock) things are variables which you have to define manually in the variables tab of the trigger editor. |
| 11-26-2003, 12:10 PM | #3 |
To play a units death animation, and to kill a unit after a set amount of time. It better to give the unit a Generic Life Counter instead of removing it with triggers. for a couple reasons: 1. What if another one is spawned before the first ones time is up, it would reset the variable and the first one wouldn't be removed. 2. Triggers can act funny with waits longer than 29 seconds. 3. Units removed from game via triggers are stored in memory. |
| 11-26-2003, 12:59 PM | #4 |
example map attached |
