• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Faster than light speed

Status
Not open for further replies.
Level 8
Joined
Apr 30, 2009
Messages
338
Is there a way to make a unit travel faster than 522?

I want my "Frozen Orb" spell to work like the one in Diablo 2. The "Orb" is a dummy unit from which other units will fire shockwaves at progressive angles as the orb itself moves in a straight line. The orb must be a unit because it also has a slowing aura. However, I would like it to move faster than 522.
 
Level 8
Joined
Apr 30, 2009
Messages
338
Is there a way to force a unit to move in the X,Y plane over a period of time besides issuing a move order? Like how the triggered impale spell in DOTA forces movement along Z?
 
Level 6
Joined
Jul 25, 2005
Messages
221
Which is kinda the whole point of this discussion. Look, you want a dummy unit's movement speed faster than 522 units /sec, so the only way to get it faster, is by instantly moving the unit. The easy function for this is:

  • Moving a Unit
    • Events
    • Conditions
    • Actions
      • -------- X, Y Coordinates --------
      • Unit - Move (Triggering unit) instantly to (Point(0.00, 0.00))
      • -------- Coordinates --------
      • Unit - Move (Triggering unit) instantly to (Position of (Triggering unit))
      • -------- Z plane --------
      • -------- The crow form allows any unit to change fly height animation --------
      • Unit - Add Crow Form to (Triggering unit)
      • Animation - Change (Triggering unit) flying height to z at 1000.00
To make it move in a line, you add a timer event that constantly moves the unit in whatever direction you want, for as long as you want, just add some nice counters and if statements to tell the timer when to stop.

  • Moving a Unit Periodically
    • Events
      • Time - Every 0.05 seconds of game time
    • Conditions
    • Actions
      • Unit - Move (Specified unit) instantly to ((Position of (Specified unit)) offset by 20.00 towards (Facing of (Specified unit)) degrees)
If you want to learn more about moving units around, here's an example map I made for another guy in the forum, explaining how everything relates to math, albeit a simple map, it'll probably be useful.

aznricepuff, I doubt he knows the JASS functions, let alone the move triggers, you have to adjust your answers to the OP's level.
 

Attachments

  • Inward Spiraling.w3x
    63.1 KB · Views: 51
Level 11
Joined
Apr 28, 2008
Messages
696
I think that using the trigger "move unit to specific point facing specific angel" interupts animations, better resets them. But via JASS I think using the functions SetUnitX and SetUnitY the animation keep flowing, but not absolut sure about that, I'm a GUIer^^

Thy
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
Using SetUnitX/Y will not interrupt animation, but it will ignore collision and stuff like that, so you can move out of the map (which will cause a crash) and you can walk through trees and other stuff.
 
Level 3
Joined
May 12, 2006
Messages
31
Using SetUnitX/Y will not interrupt animation, but it will ignore collision and stuff like that, so you can move out of the map (which will cause a crash) and you can walk through trees and other stuff.

Could you give me the command of it? If it can be used as a SCRIPT in gui.
I can only use GUI, and I am in need of unit sliding.

I made a spell like Diablo 2's Paladin's charge spell, but it resets the units animation.
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
Could you give me the command of it? If it can be used as a SCRIPT in gui.
I can only use GUI, and I am in need of unit sliding.

I made a spell like Diablo 2's Paladin's charge spell, but it resets the units animation.

Something like this:
  • Set Unit = YOUR UNIT
  • Set Speed = 4.00
  • Set X = (Speed * Cos((Facing of Unit)))
  • Set Y = (Speed * Sin((Facing of Unit)))
  • Custom script: call SetUnitX(udg_Unit, GetUnitX(udg_Unit) + udg_X)
  • Custom script: call SetUnitY(udg_Unit, GetUnitY(udg_Unit) + udg_Y)
 
Status
Not open for further replies.
Top