From the title itself I'm confused as I didn't think they were even possible (doesn't make sense to me).
Anyway to the point I'm trying to make a spell that makes your hero roll to a target but their rotation is limited so they may miss and turn around etc etc. But I'm checking the facing angle of the caster and the angle between them and their target to check which direction to turn and it's getting the correct facing angle but a negative angle for the angle between points. Which obviously doesn't work as the comparison doesn't work properly and the hero just spins constantly (haven't got to making them move yet)
My trigger is a bit mucked up as I've been trying a number of things to try making it work. Basically, how do I make them turn properly?
EDIT: Still doesn't work but I've undone loads of the trigger so it's postable.
Anyway to the point I'm trying to make a spell that makes your hero roll to a target but their rotation is limited so they may miss and turn around etc etc. But I'm checking the facing angle of the caster and the angle between them and their target to check which direction to turn and it's getting the correct facing angle but a negative angle for the angle between points. Which obviously doesn't work as the comparison doesn't work properly and the hero just spins constantly (haven't got to making them move yet)
My trigger is a bit mucked up as I've been trying a number of things to try making it work. Basically, how do I make them turn properly?
EDIT: Still doesn't work but I've undone loads of the trigger so it's postable.
-
Ball Form Loop
-
Events
-
Time - Every 0.03 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer BallForm_LoopInt) from 1 to BallForm_MaxIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(BallForm_CasterUnit[BallForm_LoopInt] is alive) Equal to True
-
(BallForm_TargetUnit[BallForm_LoopInt] is alive) Equal to True
-
BallForm_Strikes[BallForm_LoopInt] Greater than 0
-
-
Then - Actions
-
-------- Positions --------
-
Set TempPoint = (Position of BallForm_CasterUnit[BallForm_LoopInt])
-
Set TempReal = (Angle from TempPoint to Spell_TargetPoint)
-
Set Spell_TargetPoint = (Position of BallForm_TargetUnit[BallForm_LoopInt])
-
-------- If facing away slow down --------
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Or - Any (Conditions) are true
-
Conditions
-
(Facing of BallForm_TargetUnit[BallForm_LoopInt]) Greater than ((Angle from TempPoint to Spell_TargetPoint) + 4.00)
-
(Facing of BallForm_TargetUnit[BallForm_LoopInt]) Less than ((Angle from TempPoint to Spell_TargetPoint) + 4.00)
-
-
-
-
Then - Actions
-
Set BallForm_Speed[BallForm_LoopInt] = (BallForm_Speed[BallForm_LoopInt] - ((Default movement speed of BallForm_CasterUnit[BallForm_LoopInt]) x 0.10))
-
-
Else - Actions
-
Set BallForm_Speed[BallForm_LoopInt] = (BallForm_Speed[BallForm_LoopInt] + ((Default movement speed of BallForm_CasterUnit[BallForm_LoopInt]) x 0.10))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
BallForm_Speed[BallForm_LoopInt] Greater than ((Default movement speed of BallForm_CasterUnit[BallForm_LoopInt]) x 5.00)
-
-
Then - Actions
-
Set BallForm_Speed[BallForm_LoopInt] = ((Default movement speed of BallForm_CasterUnit[BallForm_LoopInt]) x 5.00)
-
-
Else - Actions
-
-
-
-
-------- Rotate --------
-
Unit - Move BallForm_CasterUnit[BallForm_LoopInt] instantly to TempPoint
-
Set TempReal = (Angle from TempPoint to Spell_TargetPoint)
-
Set TempReal = (TempReal + 180.00)
-
Game - Display to (All players) the text: (String(TempReal))
-
Game - Display to (All players) the text: (String((Facing of BallForm_CasterUnit[BallForm_LoopInt])))
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Facing of BallForm_TargetUnit[BallForm_LoopInt]) Less than TempReal
-
-
Then - Actions
-
Unit - Make BallForm_CasterUnit[BallForm_LoopInt] face ((Facing of BallForm_CasterUnit[BallForm_LoopInt]) - 4.00) over 0.00 seconds
-
Game - Display to (All players) the text: 1
-
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
(Facing of BallForm_TargetUnit[BallForm_LoopInt]) Greater than TempReal
-
-
Then - Actions
-
Unit - Make BallForm_CasterUnit[BallForm_LoopInt] face ((Facing of BallForm_CasterUnit[BallForm_LoopInt]) + 4.00) over 0.00 seconds
-
Game - Display to (All players) the text: 2
-
-
Else - Actions
-
-
-
-
-
Else - Actions
-
Animation - Remove the alternate animation tag to BallForm_CasterUnit[BallForm_LoopInt]
-
-------- DeIndex --------
-
Set BallForm_CasterUnit[BallForm_LoopInt] = BallForm_CasterUnit[BallForm_MaxIndex]
-
Set BallForm_MaxDamage[BallForm_LoopInt] = BallForm_MaxDamage[BallForm_MaxIndex]
-
Set BallForm_MinDamage[BallForm_LoopInt] = BallForm_MinDamage[BallForm_MaxIndex]
-
Set BallForm_Speed[BallForm_LoopInt] = BallForm_Speed[BallForm_MaxIndex]
-
Set BallForm_Strikes[BallForm_LoopInt] = BallForm_Strikes[BallForm_MaxIndex]
-
Set BallForm_TargetUnit[BallForm_LoopInt] = BallForm_TargetUnit[BallForm_MaxIndex]
-
Set BallForm_MaxIndex = (BallForm_MaxIndex - 1)
-
Set BallForm_LoopInt = (BallForm_LoopInt - 1)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
BallForm_MaxIndex Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
-
-
-
-
-