Pazyryk
Deity
- Joined
- Jun 13, 2008
- Messages
- 3,584
So I've created an AI combat unit using Lua and I want that unit to attack. And I want it to attack NOW and not on next turn (unit was created during AI's turn).
I believe I can do something like:
But that only works if I do all the logic to select target myself. Is there any way to tell an AI unit to just do something (now!) using its own unit logic?
I believe I can do something like:
Code:
unit:PushMission(MissionTypes.MISSION_RANGE_ATTACK, plotX, plotY, 0, 0, 1, MissionTypes.MISSION_RANGE_ATTACK, unitPlot, unit)