Warcraft III resources & community, 2003–2006 · archived

weird moving problem

7 posts
#1

weird moving problem

everytime i try casting a spell which moves a unit instantly to (target point of ability being cast), the unit gets transported to the middle of the map instead! anyone knows the problem?
#2
Make sure the event is 'Unit starts effect of an ability', if u use 'Unit begins casting an ability' it maybe doesn't get the target point, i guess.

Also, make sure your spell targeting a point not an unit.

In short, if the game cannot determine the destination point, it will return center of the map as default.

If u order unit y to move instantly to the position of unit x, but a unit x is already die, then unit y moved to center of the map.
#3
thanks. ill try to cure all the problems. long live asia :D
#4
Did you use the (Target Point of Ability Being Cast) after a wait (no matter how short it is)? If you have, then here you go... There's your problem.

(Target Point of Ability Being Cast) is reset after a wait, and so, that is why it was probably set to the center of the map.

~Daelin
#5
doh... so do i move the unit first before waiting?
#6
qwertydoh... so do i move the unit first before waiting?


..or you can store the position to a variable, then use the variable after wait action if necessary.
#7
Yes, that is why I love JASS. It gets you out of variable trouble into such situations... (Target Unit of Ability Being Cast), (Casting Unit) and many other such "variables" also reset after waits. Conclusion, in most cases its best to stick to (Triggering Unit) wheter you can (this one doesn't have to use waits), and if you really have to, use global variables. I will add this to the FAQ as well.

~Daelin