onSelectionGroupPushMission ???

ruff_hi

Live 4ever! Or die trying
Joined
Oct 24, 2005
Messages
9,135
Location
an Aussie in Boston
Does anyone know what 'onSelectionGroupPushMission' does in 'CvEventManager.py' or what the missions are?

CvEventManager.py said:
def onSelectionGroupPushMission(self, argsList):
'selection group mission'
eOwner = argsList[0]
eMission = argsList[1]
iNumUnits = argsList[2]
listUnitIds = argsList[3]

if (not self.__LOG_PUSH_MISSION):
return
if pHeadUnit:
CvUtil.pyPrint("Selection Group pushed mission %d" %(eMission))
 
O, yea. When you say drag and click a unit to move in the game, you aren't accually giveing any orders directly to the unit. The mission is passes the the unit's selection group. There may only be a single unit in a selection group, but it is still in one.

I don't think it is used by the AI, but I'm not a 100 percent on that. I don't know that in all my tests, the GameUtils.py file's cannotSelectionListMoveInto doesn't ever seem to be called by the AI.
 
great - thx for the info. That is an XML list of missions. Is there a python connection in there somewhere? One of the parameters in this event is eMission (or similar) ... does anyone have a list of what these represent?
 
For all the default missions you can call the sdk enum. Using MISSION_MOVE_TO as the example you would, MissionTypes.MISSION_MOVE_TO

You could also use, gc.getInfoTypeForString("MISSION_MOVE_TO") and this would work for the default missions and any other missions added to the missioninfos.xml.
 
Back
Top Bottom