HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Spell Trigger Help

10-14-2006, 03:32 AM#1
Nubcookie
Greetings! I'm making a spell where 47 Samurai jump out of the sky and slam the ground. The part that I am having problems is moving the Samurai when they jump; this is what I have so far:
Trigger:
Fourty Seven Ronin
Collapse Events
Unit - A unit Begins channeling an ability
Collapse Conditions
(Ability being cast) Equal to Forty-Seven Ronin
Collapse Actions
If ((Level of Forty-Seven Ronin for (Triggering unit)) Equal to 1) then do (Set fourtysevenronin_range = 350) else do (Do nothing)
If ((Level of Forty-Seven Ronin for (Triggering unit)) Equal to 2) then do (Set fourtysevenronin_range = 400) else do (Do nothing)
If ((Level of Forty-Seven Ronin for (Triggering unit)) Equal to 3) then do (Set fourtysevenronin_range = 450) else do (Do nothing)
Set fourtysevenronin_castpoint = (Target point of ability being cast)
Unit - Create 1 DummyUnit1 for (Owner of (Triggering unit)) at (Center of (Playable map area)) facing Default building facing (270.0) degrees
Unit - Add War Stomp Stun/Damage (Neutral Hostile 1) to (Last created unit)
Unit - Set level of War Stomp Stun/Damage (Neutral Hostile 1) for (Last created unit) to ((Level of Forty-Seven Ronin for (Triggering unit)) x 2)
Wait 0.01 seconds
-------- The Begining --------
Collapse For each (Integer A) from 1 to 30, do (Actions)
Collapse Loop - Actions
If (((Triggering unit) is alive) Equal to True) then do (Do nothing) else do (Skip remaining actions)
Set fourtysevenronin_jumpernumber = (fourtysevenronin_jumpernumber + 1)
Unit - Create 1 Ronin for Neutral Passive at (fourtysevenronin_castpoint offset by 600.00 towards (Random angle) degrees) facing Default building facing (270.0) degrees
Unit - Change color of (Last created unit) to (Color of (Owner of (Triggering unit)))
Unit - Set the custom value of (Last created unit) to fourtysevenronin_jumpernumber
Unit - Add Storm Crow Form to (Last created unit)
Unit - Remove Storm Crow Form from (Last created unit)
Unit - Add Locust to (Last created unit)
Unit - Turn collision for (Last created unit) Off
Unit - Pause (Last created unit)
Special Effect - Create a special effect attached to the weapon of (Last created unit) using Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
Set fourtysevenronin_sfx[fourtysevenronin_jumpernumber] = (Last created special effect)
Animation - Play (Last created unit)'s attack slam animation
Animation - Change (Last created unit)'s animation speed to 50.00% of its original speed
Animation - Change (Last created unit) flying height to 400.00 at 0.00
Wait (30.00 / 47.00) seconds
-------- End of trigger --------
Wait 30.00 seconds
Custom script: call RemoveLocation( udg_fourtysevenronin_castpoint )


The following is a jump spell I have made for my map

Trigger:
Jump
Collapse Events
Unit - A unit Begins casting an ability
Collapse Conditions
(Ability being cast) Equal to Aerial Strike
Collapse Actions
Set jumper = (Triggering unit)
Set start = (Position of jumper)
Set end = (Target point of ability being cast)
If ((Number of units in (Units within 300.00 of end matching ((Matching unit) Equal to jumper))) Equal to 0) then do (Do nothing) else do (Game - Display to (Owner of jumper), at offset (500.00, 0.00) for 3.00 seconds the text: |CFFFF0000Selected ...)
If ((Number of units in (Units within 300.00 of end matching ((Matching unit) Equal to jumper))) Equal to 0) then do (Do nothing) else do (Unit - Order jumper to Stop)
If ((Number of units in (Units within 300.00 of end matching ((Matching unit) Equal to jumper))) Equal to 0) then do (Do nothing) else do (Skip remaining actions)
Trigger - Turn off (This trigger)
Unit - Add Storm Crow Form to (Triggering unit)
Unit - Remove Storm Crow Form from (Triggering unit)
Wait 0.01 seconds
Unit - Make jumper Invulnerable
Unit - Set mana of jumper to ((Mana of jumper) - 90.00)
Unit - Turn collision for jumper Off
Unit - Pause jumper
Special Effect - Create a special effect attached to the weapon of jumper using Abilities\Weapons\PhoenixMissile\Phoenix_Missile.mdl
Set Jumpsfx = (Last created special effect)
Animation - Play jumper's attack slam animation
Animation - Change jumper's animation speed to 50.00% of its original speed
Animation - Change jumper flying height to 400.00 at 400.00
Trigger - Turn on Jump Move <gen>
Wait 1.20 seconds
Animation - Change jumper flying height to 0.00 at 1750.00
Wait 0.05 seconds
Special Effect - Destroy Jumpsfx
Wait 0.10 seconds
Unit - Make jumper Vulnerable
Unit - Create 1 DummyUnit1 for (Owner of jumper) at end facing Default building facing (270.0) degrees
Unit - Add a 1.00 second Generic expiration timer to (Last created unit)
Unit - Add War Stomp Stun/Damage (Neutral Hostile 1) to (Last created unit)
Unit - Set level of War Stomp Stun/Damage (Neutral Hostile 1) for (Last created unit) to (Level of Aerial Strike for jumper)
Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
Special Effect - Create a special effect at (Position of jumper) using Abilities\Spells\Human\Thunderclap\ThunderClapCaster.mdl
Set Jumpsfx = (Last created special effect)
Trigger - Turn off Jump Move <gen>
-------- Add Damage Stuff here --------
Wait 0.01 seconds
Unit - Turn collision for jumper On
Animation - Change jumper's animation speed to 100.00% of its original speed
Animation - Reset jumper's animation
Unit - Unpause jumper
Custom script: call RemoveLocation( udg_start )
Custom script: call RemoveLocation( udg_end )
Trigger - Turn on (This trigger)
Wait 1.00 seconds
Special Effect - Destroy Jumpsfx

Trigger:
Jump Move
Collapse Events
Time - Every 0.01 seconds of game time
Conditions
Collapse Actions
Set jumperposition = (Position of jumper)
Set temppoint = (jumperposition offset by ((Distance between start and end) / 150.00) towards (Facing of jumper) degrees)
Custom script: call RemoveLocation( udg_jumperposition )
Unit - Move jumper instantly to temppoint
Custom script: call RemoveLocation( udg_temppoint )

10-14-2006, 06:40 AM#2
zeroXD
U are using rate=0 in the first trigger at setting fly height.
Also, why do you wait 30 seconds after the loop? Actions after a loop wont be executed untill the loop is finished.
Also, i see no reason for this:
Trigger:
If ((Level of Forty-Seven Ronin for (Triggering unit)) Equal to 1) then do (Set fourtysevenronin_range = 350) else do (Do nothing)
If ((Level of Forty-Seven Ronin for (Triggering unit)) Equal to 2) then do (Set fourtysevenronin_range = 400) else do (Do nothing)
If ((Level of Forty-Seven Ronin for (Triggering unit)) Equal to 3) then do (Set fourtysevenronin_range = 450) else do (Do nothing)

This is enought, really:
Trigger:
Set fourtysevenronin_range = (300+(Level of Forty-Seven Ronin for (Triggering Unit)*50)

Primary mistake here is the rate at the fly height, but i got a feeling i dont quite see the whole spell here.
10-14-2006, 10:45 AM#3
zen87
hmm btw, use "start effect of ability" event, begining casting ability might have some problem when the unit is issued other order instantly after clicking on the skill, the trigger still fire and no mana/ cooldown is spent this way =|
10-14-2006, 04:07 PM#4
Nubcookie
Quote:
Originally Posted by zeroXD
U are using rate=0 in the first trigger at setting fly height.
Also, why do you wait 30 seconds after the loop? Actions after a loop wont be executed untill the loop is finished.
Also, i see no reason for this:
Trigger:
If ((Level of Forty-Seven Ronin for (Triggering unit)) Equal to 1) then do (Set fourtysevenronin_range = 350) else do (Do nothing)
If ((Level of Forty-Seven Ronin for (Triggering unit)) Equal to 2) then do (Set fourtysevenronin_range = 400) else do (Do nothing)
If ((Level of Forty-Seven Ronin for (Triggering unit)) Equal to 3) then do (Set fourtysevenronin_range = 450) else do (Do nothing)

This is enought, really:
Trigger:
Set fourtysevenronin_range = (300+(Level of Forty-Seven Ronin for (Triggering Unit)*50)

Primary mistake here is the rate at the fly height, but i got a feeling i dont quite see the whole spell here.
Thank you, the reason there isn't more is because I don't know how to have each Samurai move to a random point in the selected area. I can move a single one with a 0.1s repeat.

Quote:
Originally Posted by zen87
hmm btw, use "start effect of ability" event, begining casting ability might have some problem when the unit is issued other order instantly after clicking on the skill, the trigger still fire and no mana/ cooldown is spent this way =|
After the ability is casted, you cannot move, but yes, 'effect' would be better.