- Joined
- May 15, 2009
- Messages
- 192
Hello Hivers, this is me asking for help... Again.
Im just gonna skip right to it, I was doing a sliding trigger(kinda), but the unit I want to be sliding(Its not the caster, its a spawned unit) simply won't stop moving. I've got this feeling that I am missing something obvious, but I simply can't find it. Here are the two triggers and thx in advance.
Anyway help much appreciated.
Im just gonna skip right to it, I was doing a sliding trigger(kinda), but the unit I want to be sliding(Its not the caster, its a spawned unit) simply won't stop moving. I've got this feeling that I am missing something obvious, but I simply can't find it. Here are the two triggers and thx in advance.
-
Lightning Rod
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Lightning Rod
-
Actions
- Set LightningRod_Caster = (Triggering unit)
- Set LightningRod_CasterLoc = (Position of (Triggering unit))
- Set LightningRod_TargetLoc = (Target point of ability being cast)
- Set LightningRod_Angle = (Angle from LightningRod_CasterLoc to LightningRod_TargetLoc)
- Unit - Hide (Triggering unit)
- Unit - Create 1 Flashrunner Lightning Rod Form for (Owner of (Triggering unit)) at LightningRod_CasterLoc facing Default building facing degrees
- Set LightningRod_Ball = (Last created unit)
- Trigger - Turn on Lightning Rod Loop <gen>
-
Events
-
Lightning Rod Loop
-
Events
- Time - Every 0.05 seconds of game time
- Conditions
-
Actions
- Set LightningRod_Loc2 = (Position of LightningRod_Ball)
- Set LightningRod_Loc1 = (LightningRod_Loc2 offset by 15.00 towards LightningRod_Angle degrees)
- Set LightningRod_Distance = (Distance between LightningRod_TargetLoc and LightningRod_Loc2)
- Custom script: call SetUnitX(udg_LightningRod_Ball,GetLocationX(udg_LightningRod_Loc1))
- Custom script: call SetUnitY(udg_LightningRod_Ball,GetLocationY(udg_LightningRod_Loc1))
- Custom script: call RemoveLocation(udg_LightningRod_Loc1)
- Custom script: call RemoveLocation(udg_LightningRod_Loc2)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- LightningRod_Distance Greater than 0.00
-
Then - Actions
- Set LightningRod_Distance = ((Distance between LightningRod_Loc2 and LightningRod_Loc1) / 15.00)
-
Else - Actions
- Set LightningRod_Distance = (Distance between LightningRod_TargetLoc and LightningRod_Loc2)
- Trigger - Turn off Lightning Rod Loop <gen>
- Custom script: call SetUnitX(udg_LightningRod_Caster,GetLocationX(udg_LightningRod_TargetLoc))
- Custom script: call SetUnitY(udg_LightningRod_Caster,GetLocationY(udg_LightningRod_TargetLoc))
- Unit - Unhide LightningRod_Caster
- Unit - Create 1 Dummy for (Owner of LightningRod_Caster) at LightningRod_TargetLoc facing Default building facing degrees
- Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
- Unit - Add War Stomp (Neutral Hostile 1) to (Last created unit)
- Unit - Set level of War Stomp (Neutral Hostile 1) for (Last created unit) to (Level of Lightning Rod for LightningRod_Caster)
- Unit - Order (Last created unit) to Orc Tauren Chieftain - War Stomp
- Unit - Kill LightningRod_Ball
- Unit - Remove LightningRod_Ball from the game
- Custom script: call RemoveLocation(udg_LightningRod_Loc1)
- Custom script: call RemoveLocation(udg_LightningRod_Loc2)
- Custom script: call RemoveLocation(udg_LightningRod_CasterLoc)
- Custom script: call RemoveLocation(udg_LightningRod_TargetLoc)
-
If - Conditions
-
Events
Anyway help much appreciated.