SnoopyLoL
New Member
- Reaction score
- 6
Hello,
I am trying to make a skill where a unit casts a skill named "Spin Toss" on to another unit and what it does is it spins the target unit around the caster and the caster keeps facing it and then when it reaches the caster it bumps the target back to the starting point.
The part I am having trouble is the part where the target :banghead: spirals :banghead: around :banghead: the :banghead: caster!!!:banghead::banghead: A few triggers to make it have a parabola through the air would be appreciated too.
This is what I have:
This detects when the ability is casted and sets a few variables to get started.
This trigger is where I need help on. This is where the target spirals around the caster until the caster is reached, then it turns on the trigger which bumps it back.
Thank you in advance whoever can answer.
I am trying to make a skill where a unit casts a skill named "Spin Toss" on to another unit and what it does is it spins the target unit around the caster and the caster keeps facing it and then when it reaches the caster it bumps the target back to the starting point.
The part I am having trouble is the part where the target :banghead: spirals :banghead: around :banghead: the :banghead: caster!!!:banghead::banghead: A few triggers to make it have a parabola through the air would be appreciated too.
This is what I have:
This detects when the ability is casted and sets a few variables to get started.
Code:
Spin Start
Events
Unit - A unit Begins casting an ability
Conditions
(Ability being cast) Equal to Spin Toss
Actions
Set SpinToss_Spin_Time = 80
Set SpinToss_Caster = (Casting unit)
Set SpinToss_End_Point = (Position of (Target unit of ability being cast))
Unit Group - Add (Target unit of ability being cast) to SpinToss_SpinningUnit
This trigger is where I need help on. This is where the target spirals around the caster until the caster is reached, then it turns on the trigger which bumps it back.
Code:
Spin Periodic
Events
Time - Every 0.02 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in SpinToss_SpinningUnit and do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
SpinToss_Spin_Time Not equal to 0
Then - Actions
Set SpinToss_Spin_Time = (SpinToss_Spin_Time - 1)
Set SpinToss_Unit_Point = (Position of (Picked unit))
[B]Unit - Make SpinToss_Caster face (Picked unit) over 0.00 seconds
Set SpinToss_Target_Point = (SpinToss_Unit_Point offset by -10.00 towards (Facing of SpinToss_Caster) degrees)
Unit - Move (Picked unit) instantly to SpinToss_Target_Point
Unit - Move SpinToss_Caster instantly to (Position of SpinToss_Caster), facing ((Facing of (Triggering unit)) + 6.00) degrees
Set SpinToss_Target_Point = (SpinToss_Target_Point offset by 10.00 towards ((Facing of SpinToss_Caster) + 90.00) degrees)
Unit - Move (Picked unit) instantly to SpinToss_Target_Point[/B]
Else - Actions
Special Effect - Create a special effect attached to the overhead of (Picked unit) using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
Unit Group - Remove (Picked unit) from SpinToss_SpinningUnit
Unit Group - Add (Picked unit) to SpinToss_Throwing_Unit
Set SpinToss_Throw_Time = 80
Thank you in advance whoever can answer.