My math fails, help with jump spell, please!

Murre

New Member
Reaction score
14
Hello!
I've got a problem with my triggered spell "Bullet of Fire", basically it's a jump spell. When you land you damage and stun enemies around. Though, the problem here is the movement.
First, the caster moves to some random location around the targeted point (wrong), and moves towards the point (right).
Here is the triggers, the spell is based on channel.

Trigger:
  • Bullet of Fire
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Bullet of Fire
    • Actions
      • Set BoF_Caster = (Triggering unit)
      • Set BoF_Point[1] = (Target point of ability being cast)
      • Set BoF_Point[2] = (Position of BoF_Caster)
      • Countdown Timer - Start BoF_Timer as a Repeating timer that will expire in 2.00 seconds
      • Unit - Add Crow Form to BoF_Caster
      • Animation - Change BoF_Caster flying height to 1000.00 at 1000.00
      • Set BoF_Offset = (Distance between BoF_Point[2] and BoF_Point[1])
      • Trigger - Turn on Bullet of Fire Periodic <gen>
      • Animation - Play BoF_Caster's Spell Slam animation
      • Wait 1.00 seconds
      • Animation - Change BoF_Caster flying height to 0.00 at 1000.00
      • Wait 0.50 seconds
      • Unit - Remove Crow Form from BoF_Caster
      • Wait 0.50 seconds
      • Countdown Timer - Pause BoF_Timer
      • Wait 0.50 seconds
      • Custom script: call RemoveLocation (udg_BoF_Point[1])
      • Custom script: call RemoveLocation (udg_BoF_Point[2])



Trigger:
  • Bullet of Fire Periodic
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set BoF_Point[3] = (BoF_Point[1] offset by (BoF_Offset - (BoF_Offset / 40.00)) towards (Center X of (Region centered at BoF_Point[2] with size (10.00, 10.00))) degrees)
      • Unit - Move BoF_Caster instantly to BoF_Point[3], facing (Angle from BoF_Point[2] to BoF_Point[1]) degrees
      • Set BoF_Offset = (BoF_Offset - (BoF_Offset / 50.00))
      • Custom script: call RemoveLocation (udg_BoF_Point[3])



Trigger:
  • Bullet of Fire End
    • Events
      • Time - BoF_Timer expires
    • Conditions
    • Actions
      • Trigger - Turn off Bullet of Fire Periodic <gen>
      • Set BoF_TargetGroup = (Units within 350.00 of BoF_Point[1] matching ((((Matching unit) is dead) Equal to False) and ((((Matching unit) belongs to an ally of (Owner of BoF_Caster)) Equal to False) and (((Matching unit) is Magic Immune) Equal to False))))
      • Unit Group - Pick every unit in BoF_TargetGroup and do (Actions)
        • Loop - Actions
          • Unit - Create 1 dummyUnit for (Owner of BoF_Caster) at BoF_Point[1] facing Default building facing degrees
          • Set BoF_DummyUnit = (Last created unit)
          • Unit - Add Bullet of Fire stun to BoF_DummyUnit
          • Unit - Set level of Bullet of Fire stun for FaceSmash_DummyUnit to (Level of Bullet of Fire for BoF_Caster)
          • Unit - Order BoF_DummyUnit to Human Mountain King - Storm Bolt (Picked unit)
      • Custom script: call DestroyGroup (udg_BoF_TargetGroup)


Also, I'll attach the map for you to see the movement and other possibly wrong things. :p (It's called Polarity Shift 'cuz of an earlier request)
+rep for anyone who helps ;)

Thanks in advance
/Murre
 

Attachments

  • Polarity Shift.w3x
    28.8 KB · Views: 131

Vnbear

Active Member
Reaction score
12
Not sure if this is what you wanted..

Trigger:
  • Bullet of Fire Periodic
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set BoF_Point[3] = (BoF_Point[1] offset by (BoF_Offset - (BoF_Offset / 40.00)) towards (Angle from BoF_Point[1] to BoF_Point[2]) degrees)
      • Unit - Move BoF_Caster instantly to BoF_Point[3], facing (Angle from BoF_Point[2] to BoF_Point[1]) degrees
      • Set BoF_Offset = (BoF_Offset - (BoF_Offset / 50.00))
      • Custom script: call RemoveLocation (udg_BoF_Point[3])
 

Murre

New Member
Reaction score
14
Not sure if this is what you wanted..

Trigger:
  • Bullet of Fire Periodic
    • Events
      • Time - Every 0.01 seconds of game time
    • Conditions
    • Actions
      • Set BoF_Point[3] = (BoF_Point[1] offset by (BoF_Offset - (BoF_Offset / 40.00)) towards (Angle from BoF_Point[1] to BoF_Point[2]) degrees)
      • Unit - Move BoF_Caster instantly to BoF_Point[3], facing (Angle from BoF_Point[2] to BoF_Point[1]) degrees
      • Set BoF_Offset = (BoF_Offset - (BoF_Offset / 50.00))
      • Custom script: call RemoveLocation (udg_BoF_Point[3])
What part are you referring to? :eek:
Edit: Lol, tried what you suggested and I realised that I thought I had tried that, but I used reverse (From CasterPoint to AbilityPoint) :p Thanks for pointing it out, +rep ;D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top