Baltazhar
Active Member
- Reaction score
- 55
Let me first point out that I have tried like 10 different structures of this spell, having a unit variable to define triggering unit.
In this I pasted, I set the unit to a unit group with only him, and used "random unit in group".
The idea is that he targets a point with his ability (made off Shockwave), and slides to that point, at which he stops and turns normal (collision, invulnerability and unpaused).
Trigger one:
Second trigger should do the actual moving of the unit, and stop him when he's close enough.
The effect varies with different setups I make, but nothing actually moves him. I have already made a couple of slidespells in this map, this just doesn't wanna work :nuts:
The outcome of this spell is that he casts Shockwave towards the center of the map (nomatter where it's targeted), and gets 0 collision, invulnerability and is paused. Then nothing else happens.
I would greatly appreciate any pointers as where to this is failing, it's driving me nuts! >.<
Thanks in advance.
- Balt
In this I pasted, I set the unit to a unit group with only him, and used "random unit in group".
The idea is that he targets a point with his ability (made off Shockwave), and slides to that point, at which he stops and turns normal (collision, invulnerability and unpaused).
Trigger one:
Code:
Shield Charge
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being cast) Equal to Shield Charge
Actions
Set ShieldChargeGroup = (Units owned by (Owner of (Triggering unit)) of type Veteran Warrior)
Set ShieldChargeTargetPoint = (Target point of ability being cast)
Unit - Turn collision for (Triggering unit) Off
Unit - Make (Triggering unit) Invulnerable
Unit - Pause (Triggering unit)
Trigger - Turn on Shield Charge Move <gen>
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
Second trigger should do the actual moving of the unit, and stop him when he's close enough.
Code:
Shield Charge Move
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
Set ShieldChargeCasterPoint = (Position of (Random unit from ShieldChargeGroup))
Set Temp_Point = (ShieldChargeCasterPoint offset by 20.00 towards (Angle from ShieldChargeCasterPoint to ShieldChargeTargetPoint) degrees)
Set ShieldChargeCasterPoint = Temp_Point
Custom script: call RemoveLocation (udg_Temp_Point)
Unit Group - Pick every unit in ShieldChargeGroup and do (Actions)
Loop - Actions
Unit - Move (Picked unit) instantly to ShieldChargeCasterPoint
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between ShieldChargeCasterPoint and ShieldChargeTargetPoint) Less than 20.00
Then - Actions
Unit - Turn collision for (Random unit from ShieldChargeGroup) On
Unit - Make (Random unit from ShieldChargeGroup) Vulnerable
Unit - Unpause (Random unit from ShieldChargeGroup)
Trigger - Turn off (This trigger)
Else - Actions
The effect varies with different setups I make, but nothing actually moves him. I have already made a couple of slidespells in this map, this just doesn't wanna work :nuts:
The outcome of this spell is that he casts Shockwave towards the center of the map (nomatter where it's targeted), and gets 0 collision, invulnerability and is paused. Then nothing else happens.
I would greatly appreciate any pointers as where to this is failing, it's driving me nuts! >.<
Thanks in advance.
- Balt