Pazyryk
Deity
- Joined
- Jun 13, 2008
- Messages
- 3,584
There's a thread on this already, but its >1 yr old and perhaps out of date.
First, the function seems to have 9 args, but then the wiki gives an example usage that is much simpler:
Does anyone know if the above will drive an AI unit?
Here it is with 9 args (I'm not sure where I copied this from now):
If I have to use this longer form, where can I find missionAItypes? Would GameInfoTypes.MISSION_MOVE_TO work for both missionType and missionAItype?
The old thread above calls this function using SerialEventUnitInfoDirty. But I think this may have been before PlayerDoTurn even existed. Is there any reason why I can't do the PushMission from PlayerDoTurn instead? Has the AI already moved its units at PlayerDoTurn or do they move right after this?
Is there any way to Get a unit's mission?
First, the function seems to have 9 args, but then the wiki gives an example usage that is much simpler:
unit
ushMission(GameInfoTypes.MISSION_MOVE_TO, plotX, plotY)

Does anyone know if the above will drive an AI unit?
Here it is with 9 args (I'm not sure where I copied this from now):
unit
ushMission(missionType, x, y, 0, 0, 1, missionAItype, plot, unit)

If I have to use this longer form, where can I find missionAItypes? Would GameInfoTypes.MISSION_MOVE_TO work for both missionType and missionAItype?
The old thread above calls this function using SerialEventUnitInfoDirty. But I think this may have been before PlayerDoTurn even existed. Is there any reason why I can't do the PushMission from PlayerDoTurn instead? Has the AI already moved its units at PlayerDoTurn or do they move right after this?
Is there any way to Get a unit's mission?