• 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.

weird moving problem

Status
Not open for further replies.
Level 10
Joined
Jul 2, 2004
Messages
690
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?
 
Level 13
Joined
Dec 29, 2004
Messages
597
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.
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
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
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
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
 
Status
Not open for further replies.
Top