jkp1187
Unindicted Co-Conspirator
Here's the situation: I am trying to script an event where a randomly selected Worker unit will be immobile for 2 turns. The EventInfos.xml file has a field for making a selected unit immobile, but for some reason, it isn't working with a worker unit.
I looked through the API under CyUnit, and found these two commands that looked likely. I'm guessing that the second "setImmobileTimer" is the same function that the XML is trying to call, so that's probably no good. "doCommand" seems like it might be correct. Can someone point out to me where I might find examples of the sorts of unit commands that could be forced using doCommand?
Thanks.
I looked through the API under CyUnit, and found these two commands that looked likely. I'm guessing that the second "setImmobileTimer" is the same function that the XML is trying to call, so that's probably no good. "doCommand" seems like it might be correct. Can someone point out to me where I might find examples of the sorts of unit commands that could be forced using doCommand?
Thanks.
Code:
void doCommand (CommandTypes eCommand, int iData1, int iData2)
void (eCommand, iData1, iData2) - force the unit to perform eCommand
void setImmobileTimer (int) BtS Only
void (int)