HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Changing Unit Speed

02-21-2007, 07:35 PM#1
Omnikron13
How do you change the movement speed of a unit using JASS?

I looked through the JASS manual, and all I found was SetUnitMoveSpeed(), which doesn't seem to actually work...

What is the correct function to use/how do you use it?
02-21-2007, 11:58 PM#2
Pyrogasm
It is call SetUnitMovespeed(); I've used it in functions before.
Quote:
Collapse JASS:
native SetUnitMoveSpeed takes unit whichUnit, real newSpeed returns nothing

02-22-2007, 12:28 AM#3
Omnikron13
Ok... I have a more serious problem, then...

I am trying to set a units movement speed to 0. I just ran a quick test now, and the speed was only dropped to 150... Is this some kind of engine restriction, or something..? Though you can start units with 0 movement speed...

What would be the correct method for setting a units movement speed to 0?
02-22-2007, 12:34 AM#4
Pyrogasm
Under gameplay constants, change the Max and Min movespeeds to whatever you want. For your purposes, set the Minimum speed to 0.
02-22-2007, 12:41 AM#5
Ammorth
Keep in mind though, if any unit gets enough movement reducing effects, it will have a movement speed of 0. The limit is there so that units do not reach a movement speed of 0.
02-22-2007, 12:43 AM#6
Omnikron13
Ah, I thank you. =)