|
本帖最后由 qevhytpl 于 2012-3-17 20:24 编辑
Example would be like this:
First, get the house you want to put your soldier in, few ways to do this, I'd recommend to get it's ID number (Show IDs, pick it out) and use the nearestObjects command to reference it.
Then through trial and error place the unit at the various positions in the house (0 - however many), some example code for that:
In the unit's init
Code:
this setPos (house1 buildingPos 3);
house1 would have to be declared earlier, an example on how to do that, again, few ways to do it:
Place an invisible H, in it's init:
Code:
house1 = (getPos this) nearestObjects 123456;
123456 is the ID of the house you want.
最后两句怎么整? |
|