- Joined
- May 10, 2014
- Messages
- 41
Hello!
I create a spell, that moves target unit by fixed distance in casters facing angle direction.
How it works:
-set distance
-set move = 'number'
-set count = distace / move
Cycle (while count =! 0)
-set point_to_move = position of target unit offset by move
-move target unit to point_to_move
-count - 1
I want target unit ''touch'' other units and decorations while it's moving, so I don't modify collision.
So... games CRASHES (not fatal error, but extreme lag, like screenshot)...
But it happening only if there is no 'free' point to move target unit, because of terrain, trees, or other units.
How can I check: is point is free to move???
And if it's not - stop moving (set count to 0).
Thank everybody for any information!
I create a spell, that moves target unit by fixed distance in casters facing angle direction.
How it works:
-set distance
-set move = 'number'
-set count = distace / move
Cycle (while count =! 0)
-set point_to_move = position of target unit offset by move
-move target unit to point_to_move
-count - 1
I want target unit ''touch'' other units and decorations while it's moving, so I don't modify collision.
So... games CRASHES (not fatal error, but extreme lag, like screenshot)...
But it happening only if there is no 'free' point to move target unit, because of terrain, trees, or other units.
How can I check: is point is free to move???
And if it's not - stop moving (set count to 0).
Thank everybody for any information!
