• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a faction for Warcraft 3 and enter Hive's 19th Techtree Contest: Co-Op Commanders! Click here to enter!
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 21st Texturing Contest: Upgrade is now concluded, time to vote for your favourite set of icons! Click here to vote!

How to make unit move faster than 522?

Status
Not open for further replies.
Level 5
Joined
Apr 16, 2005
Messages
153
There might be a few things you have to change in the unit editor as well, im not sure. The only time ive had a unit move faster than 522 is when i put a uber endurance aura on him
 
Level 3
Joined
Jun 18, 2007
Messages
72
After setting it to 1000 or w/e in the gameplay constants did you make sure to change the "Movement - Speed Base" to 1000? Thats what i did for a unit of mine and he's definitely moving MUCH faster. If you want the animation also to look more normal to the speed, change the "Art - Run Speed" to the same as the speed base. Just changing the speed max in gameplay constants wont actually increase the unit speed.
 
JASS:
function SlideUnit_Action takes nothing returns nothing
local trigger t = GetTriggeringTrigger()
local unit u = GetHandleUnit(t,"u")
local real a = GetHandleReal(t,"a")
local real d = GetHandleReal(t,"d")
local real l = GetHandleReal(t,"l")
local real r = GetHandleReal(t,"r")
local real s = GetHandleReal(t,"s")
local real x = GetUnitX(u)
local real y = GetUnitY(u)
local rect e = bj_mapInitialPlayableArea


set s = s + l

if s >= r then
call DestroyTrigger(t)
call FlushHandleLocals(t)
set t = null
else
if (GetRectMinX(e) <= x) and (x <= GetRectMaxY(e)) and (GetRectMinY(e) <= y) and (y <= GetRectMaxY(e)) == true then
call SetUnitX(u,x + (d/r*l) * Cos(a * 0.017))
call SetUnitY(u,y + (d/r*l) * Sin(a * 0.017))
endif
call SetHandleReal(t,"s",s)
endif



set t = null
set u = null
set a = 0
set d = 0
set l = 0
set s = 0
set x = 0
set y = 0

endfunction


function SlideUnit takes unit u,real a,real d,real r,real l returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterTimerEvent(t,l,true)
call TriggerAddAction(t,function SlideUnit_Action)
call SetHandleHandle(t,"u",u)
call SetHandleReal(t,"a",a)
call SetHandleReal(t,"d",d) 
call SetHandleReal(t,"l",l)
call SetHandleReal(t,"r",r)

set u = null
set a = 0
set d = 0
set l = 0

endfunction

This is efficient.
 
Status
Not open for further replies.
Top