Slide unit without forgetting orders

FireBladesX

Eating my wings!
Reaction score
123
How do I move a unit without making it forget it's current order? (Continue attacking while sliding)
 

FireBladesX

Eating my wings!
Reaction score
123
Oh. I worded it funny, I guess.
I meant so that if a unit is attacking, and you slide it, it doesn't stop attacking.
 

Renendaru

(Evol)ution is nothing without love.
Reaction score
309
Use Jass for the sliding. :D
 

FireBladesX

Eating my wings!
Reaction score
123
So, what's the custom script to set a unit's x to a variable and arithmetic (addition and subtraction)?
 

Expelliarmus

Where to change the sig?
Reaction score
48
Code:
Actions
    Set Temp_Position[0] = (Position of (Triggering unit))
    Set Temp_Position[1] = (Target point of ability being cast)
    Set Temp_Position[2] = (Temp_Position[0] offset by 20.00 towards (Angle from Temp_Position[0] to Temp_Position[1]) degrees)
    Custom script:   call SetUnitX(GetTriggerUnit(), GetLocationX(udg_Temp_Position[2]))
    Custom script:   call SetUnitY(GetTriggerUnit(), GetLocationY(udg_Temp_Position[2]))
    Custom script:   call RemoveLocation(udg_Temp_Position[0])
    Custom script:   call RemoveLocation(udg_Temp_Position[1])
    Custom script:   call RemoveLocation(udg_Temp_Position[2])
 

FireBladesX

Eating my wings!
Reaction score
123
Let's say I want to set the position to the variables ParaX and ParaY (Real numbers), with the value of the array being [ParaInt + 5].
I'm not very jass-fluent, would you mind showing me the script for that?
 

Expelliarmus

Where to change the sig?
Reaction score
48
with the value of the array being [ParaInt + 5].
I don't quite get you.
Code:
Actions
    Custom script:   call SetUnitX(GetTriggerUnit(), udg_ParaX)
    Custom script:   call SetUnitY(GetTriggerUnit(), udg_ParaY)
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
I don't quite get you.
Code:
Actions
    Custom script:   call SetUnitX(GetTriggerUnit(), udg_ParaX)
    Custom script:   call SetUnitY(GetTriggerUnit(), udg_ParaY)

I think he means udg_ParaX and udg_ParaY's are real arrays, and the array value being used is [ParaInt + 5] :

Code:
Actions
    Custom script:   call SetUnitX(GetTriggerUnit(), udg_ParaX[udg_ParaInt + 5])
    Custom script:   call SetUnitY(GetTriggerUnit(), udg_ParaY[udg_ParaInt + 5])
 
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