- Joined
- Jan 9, 2005
- Messages
- 2,129
I'm trying to make a unit to Stop when it finishes training, or when it's given a move order, but it's not responding and keeps on moving. I've tried a bunch of things but nothing's working.
This doesn't work. I've tried with Stunned or ordering it to move at it's own location, but no success so far. SetUnitPosition doesn't seem to cancel orders either right after the units is created or given a move order. The only thing that 'works' is to wait something like 0.3 seconds and then ordering the stop, which is... not ideal. At all.
If this is at all relevant, that unit is supposed to start orbiting the building that created it with SetUnitX/Y, so that it can still attack anything that comes close to it.
JASS:
call PauseUnit(sentinel, true)
call IssueImmediateOrderById(sentinel, 851972) //Stop Order
call PauseUnit(sentinel, false)
This doesn't work. I've tried with Stunned or ordering it to move at it's own location, but no success so far. SetUnitPosition doesn't seem to cancel orders either right after the units is created or given a move order. The only thing that 'works' is to wait something like 0.3 seconds and then ordering the stop, which is... not ideal. At all.
If this is at all relevant, that unit is supposed to start orbiting the building that created it with SetUnitX/Y, so that it can still attack anything that comes close to it.