HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Help on trigger(moving units thru trigger)

05-07-2004, 01:45 PM#1
SirSalute
I have trouble with these following triggers, I wanted a blink-bolt type of spell, so i based this spell of storm bolt and 'blink' the hero using trigger. All the expected effects are working except that the place that the hero blink is always in the middle of the map, sometimes further downward from the center. Can anyone help me in finding the error in these triggers? thanks alot.
n00blar Strike
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to n00blar Strike
Actions
Trigger - Turn off (This trigger)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between (Position of (Casting unit)) and (Position of (Target unit of ability being cast))) Greater than 30.00
Then - Actions
Set n00blar_Strike_caster = (Casting unit)
Set n00blar_strike_target = (Target unit of ability being cast)
Unit - Create 1 (Unit-type of (Casting unit)) for Neutral Passive at (Position of n00blar_Strike_caster) facing (Angle from (Position of n00blar_Strike_caster) to (Position of n00blar_strike_target)) degrees
Set n00bkiller_Shadow = (Last created unit)
Unit - Turn collision for n00bkiller_Shadow Off
Unit - Change color of n00bkiller_Shadow to (Color of (Owner of n00blar_Strike_caster))
Animation - Change n00bkiller_Shadow's animation speed to 0.00% of its original speed
Animation - Change n00bkiller_Shadow's vertex coloring to (0.00%, 0.00%, 100.00%) with 0.00% transparency
Trigger - Turn on n00blar Strike Continue <gen>
Else - Actions
Trigger - Turn on n00blar Strike Finish <gen>

n00blar Strike Continue
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Transparency_n00bkiller Equal to 0
Then - Actions
Special Effect - Create a special effect attached to the overhead of n00blar_Strike_caster using Abilities\Weapons\AvengerMissile\AvengerMissile.mdl
Set SpecialEffect[3] = (Last created special effect)
Unit - Pause n00bkiller_Shadow
Unit - Move n00blar_Strike_caster instantly to ((Position of n00blar_Strike_caster) offset by (Distance between (Position of n00blar_Strike_caster) and ((Target point of ability being cast) offset by 64.00 towards (Angle from (Target point of ability being cast) to (Position of n00blar_Strike_caster)) deg
Unit - Move SpellCaster[2] instantly to (Position of n00blar_Strike_caster)
Unit - Order SpellCaster[2] to Human Mountain King - Storm Bolt n00blar_strike_target
Else - Actions
Do nothing
Set Transparency_n00bkiller = (Transparency_n00bkiller + 1)
Animation - Change n00bkiller_Shadow's vertex coloring to (0.00%, 0.00%, 100.00%) with (Real(Transparency_n00bkiller))% transparency
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Transparency_n00bkiller Greater than or equal to 100
Then - Actions
Special Effect - Destroy SpecialEffect[3]
Unit - Unpause n00bkiller_Shadow
Unit - Explode n00bkiller_Shadow
Set Transparency_n00bkiller = 0
Trigger - Turn off (This trigger)
Trigger - Turn on n00blar Strike <gen>
Else - Actions
Do nothing

n00blar Strike Finish
Events
Time - Every 0.03 seconds of game time
Conditions
Actions
Unit - Move SpellCaster[2] instantly to (Position of n00blar_Strike_caster)
Unit - Order SpellCaster[2] to Human Mountain King - Storm Bolt n00blar_strike_target
Special Effect - Destroy SpecialEffect[3]
Trigger - Turn off (This trigger)
Trigger - Turn on n00blar Strike <gen>


Thanks in advance
05-07-2004, 02:02 PM#2
Kamux
From the second trigger:
Unit - Move n00blar_Strike_caster instantly to ((Position of n00blar_Strike_caster) offset by (Distance between (Position of n00blar_Strike_caster) and ((Target point of ability being cast) offset by 64.00 towards (Angle from (Target point of ability being cast) to (Position of n00blar_Strike_caster)) deg

There is no abillity being cast, because it is a periodic event trigger. Try storing the target point of abillity being cast in a variable in the first trigger and use that variable instead.
05-07-2004, 02:23 PM#3
SirSalute
Thank you. Thank you very much. :D
05-07-2004, 09:42 PM#4
ThyFlame
Why dont you just run the trigger without an event instead of turning the trigger on when all it does is wait .03 seconds before running the actions?