Move Triggers

SouLEDGE

Damn you advanced calculus
Reaction score
75
Okay, well I'm interested in remaking an old spell of mine,
and I just can't seem to wrap my head around using the action:

Trigger:
  • Unit - Move Sonic_Caster instantly to (Sonic_Target_Loc offset by (Real(Sonic_Range)) towards ((Angle from Sonic_Target_Loc to Sonic_Caster_Loc) + (Real(((Integer A) x 60)))) degrees), facing Sonic_Target_Loc


If someone can (try) explain how the point offsets etc. works with an example maybe it'd be greatly appreciated:thup:
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Rough idea, hope it helps.


Edit: So the final point you are moving to, is at the tip of the blue arrowhead.
 

Attachments

  • Explanation.png
    Explanation.png
    14.6 KB · Views: 128

TomTTT

New Member
Reaction score
44
By what you done it looks like you know how it works.
The Point with Polar Offset is mainly from the point itself, from a certain range from the point towards the angle (whats the problem here?)
Point with Offset is not from a certain point towards a point, but simple X and Y grid.
Lets say, you want to move the unit (Polar Offset):
Trigger:
  • Actions
    • Set Caster = (Triggering unit)
    • Set Points[1] = (Position of Caster)
    • Set tmpUnitGroup = (Units within 1000.00 of Points[1])
    • Set Target = (Random unit from tmpUnitGroup)
    • Set Degrees = (Random real number between 1.00 and 180.00)
    • Set Distance = (Random real number between 100.00 and 200.00)
    • Unit - Move Caster instantly to (Points[2] offset by Distance towards Degrees degrees)
    • Custom script: call RemoveLocation(udg_Points[1])
    • Custom script: call RemoveLocation(udg_Points[2])
    • Custom script: call DestroyGroup(udg_tmpUnitGroup)

But i'm not sure if thats your problem, cause it seems pretty simple.
You now moved Caster towards Target, but with a gap of Distance, that is towards the Degrees.
skyblade333's image shows it pretty well.
 

SouLEDGE

Damn you advanced calculus
Reaction score
75
Yeah I'll show you my old spell, and don't ask me how I managed this:
Trigger:
  • Sonic Rush
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Sonic Rush (Dummy Spell)
    • Actions
      • Set Sonic_Target = (Target unit of ability being cast)
      • Set Sonic_Caster = (Triggering unit)
      • Set Temp_Int = ((Agility of Sonic_Caster (Include bonuses)) x 2)
      • Set Sonic_level = ((Level of Sonic Rush (Dummy Spell) for Sonic_Caster) + 1)
      • Unit - Pause Sonic_Target
      • Set Sonic_Target_Loc = (Position of Sonic_Target)
      • Set Sonic_Caster_Loc = (Position of (Triggering unit))
      • Set Sonic_Range = (Integer((Distance between (Position of Sonic_Caster) and (Position of Sonic_Target))))
      • Unit - Pause Sonic_Caster
      • Unit - Make Sonic_Caster Invulnerable
      • Special Effect - Create a special effect attached to the (left + hand) of Sonic_Caster using Abilities\Weapons\PhoenixMissile\Phoenix_Missile_mini.mdl
      • Set Special_Effect[1] = (Last created special effect)
      • Special Effect - Create a special effect attached to the (right + hand) of Sonic_Caster using Abilities\Weapons\PhoenixMissile\Phoenix_Missile_mini.mdl
      • Set Special_Effect[2] = (Last created special effect)
      • Animation - Play Sonic_Caster's attack animation
      • Animation - Change Sonic_Caster's animation speed to 25.00% of its original speed
      • Wait 1.80 seconds
      • Animation - Change Sonic_Caster's animation speed to 0.00% of its original speed
      • Unit - Turn collision for Sonic_Caster Off
      • Animation - Change Sonic_Caster's vertex coloring to (100.00%, 100.00%, 100.00%) with 75.00% transparency
      • For each (Integer A) from 1 to (Sonic_level x 3), do (Actions)
        • Loop - Actions
          • Unit - Move Sonic_Caster instantly to (Sonic_Target_Loc offset by (Real(Sonic_Range)) towards ((Angle from Sonic_Target_Loc to Sonic_Caster_Loc) + (Real(((Integer A) x 60)))) degrees), facing Sonic_Target_Loc
          • Set Special_Effect[3] = (Last created special effect)
          • Wait 0.03 seconds
          • Unit - Move Sonic_Caster instantly to Sonic_Target_Loc
          • Special Effect - Create a special effect attached to the origin of Sonic_Target using Objects\Spawnmodels\Human\HumanBlood\HumanBloodPeasant.mdl
          • Wait 0.03 seconds
          • Unit - Move Sonic_Caster instantly to (Sonic_Target_Loc offset by (Real(Sonic_Range)) towards (((Angle from Sonic_Target_Loc to Sonic_Caster_Loc) + 180.00) + (Real(((Integer A) x 60)))) degrees), facing Sonic_Target_Loc
          • Unit - Cause Sonic_Caster to damage Sonic_Target, dealing ((Max life of Sonic_Target) x 0.03) damage of attack type Chaos and damage type Normal
          • Sound - Play Sonic_Attack_Sound[1] at 100.00% volume, attached to Sonic_Caster
          • Set Sonic_Rush_crit = (Random integer number between 1 and 100)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Sonic_Rush_crit Less than or equal to (Sonic_level x 10)
            • Then - Actions
              • Unit - Cause Sonic_Caster to damage Sonic_Target, dealing (Real(Temp_Int)) damage of attack type Chaos and damage type Normal
              • Floating Text - Create floating text that reads ((String(Temp_Int)) + !) above Sonic_Target with Z offset 0.00, using font size 10.00, color (10.00%, 100.00%, 10.00%), and 5.00% transparency
              • Floating Text - Change the fading age of (Last created floating text) to 0.50 seconds
              • Floating Text - Change (Last created floating text): Disable permanence
              • Floating Text - Change the lifespan of (Last created floating text) to 2.00 seconds
              • Floating Text - Set the velocity of (Last created floating text) to 150.00 towards 0.00 degrees
            • Else - Actions
              • Do nothing
          • Floating Text - Create floating text that reads (DAMAGE NO.: + (String((Integer A)))) above Sonic_Target with Z offset 0.00, using font size 10.00, color (100.00%, 100.00%, 100.00%), and 0.00% transparency
          • Floating Text - Set the velocity of (Last created floating text) to 120.00 towards 45.00 degrees
          • Wait 0.03 seconds
          • Special Effect - Destroy Special_Effect[3]
          • If ((Life of Sonic_Target) Less than or equal to 0.00) then do (Custom script: exitwhen true) else do (Do nothing)
      • Animation - Change Sonic_Caster's vertex coloring to (100.00%, 100.00%, 100.00%) with 0.00% transparency
      • Unit - Make Sonic_Caster Vulnerable
      • Animation - Change Sonic_Caster's animation speed to 100.00% of its original speed
      • Unit - Unpause Sonic_Caster
      • Animation - Play Sonic_Caster's slam animation
      • Special Effect - Destroy Special_Effect[1]
      • Special Effect - Destroy Special_Effect[2]
      • Unit - Turn collision for Sonic_Caster On
      • Unit - Move (Triggering unit) instantly to Sonic_Target_Loc, facing Sonic_Target_Loc
      • Unit - Unpause Sonic_Target
      • Custom script: call RemoveLocation(udg_Sonic_Target_Loc)
      • Custom script: call RemoveLocation(udg_Sonic_Caster_Loc)


Now it just looks ugly and the order of the movements isn't the way
I want it to be, so I just want to clean it up.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Er, before I go through that or try anything, could you post now what the problem is? Or whether it's solved and you just want to do the clearing up. And if there is a problem, how you want the spell to be?
 

SouLEDGE

Damn you advanced calculus
Reaction score
75
lol, I definitely don't expect anyone to go through if they don't want to
it's just for interest sake.

I'm gonna work out the new method of moving
my hero and when it's done I'll post a demo map
so you can what it looks like.
 

TomTTT

New Member
Reaction score
44
MY EYES!
MY EYES!!
Such a long trigger. I never got to these. I don't think i ever had such a patience. Anyway, i'll try see whats possible, but ill skip the animation part, cause it hate it :D.
Alright, i made a simple map, mostly focused on the movement, and less on the actual look and damage. Hope you'll like it.
NOTES: remember to make the follow through time always 0.01 more time than the ability takes (such as waits), or else the unit will stop in the middle.
 

Attachments

  • Quick Moving Ability.w3x
    18.3 KB · Views: 109

SouLEDGE

Damn you advanced calculus
Reaction score
75
Rofl, thanks for the demo map but the trigger was actually just so you guys
could see in what context I was using it in. The way it is currently is by all
means wrong so I'm gonna fix it myself, I just never had a firm grasp of
the polar offsets but I've got it figured out now :D
 

TomTTT

New Member
Reaction score
44
Rofl, thanks for the demo map but the trigger was actually just so you guys
could see in what context I was using it in. The way it is currently is by all
means wrong so I'm gonna fix it myself, I just never had a firm grasp of
the polar offsets but I've got it figured out now :D

Glad you made it! GL with the rest of the map.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top