OrionVeteran
Deity
I have a plot with 4 units that are all the same exact type. Let's say I create a new unit (a 5th unit) that is also the same type. What I want to do is to isolate the new unit after it is created so that I can manipulate it (give it a promotion, change an attribute, etc.), as opposed to the other 4 units. Will the following line of code work to create and isolate a new unit?
Using this line, can I use the pLayerNewUnit to do the following:
I don't want the promotion line to create a sixth unit, rather I want it to promote the unit just created. Will it work?
Code:
playerNewUnit = pPlayer.initUnit(iUnitType, iX, iY, DefaultUnitAI, DirectionTypes.NO_DIRECTION)
Using this line, can I use the pLayerNewUnit to do the following:
Code:
pLayerNewUnit.setHasPromotion(iProm)
I don't want the promotion line to create a sixth unit, rather I want it to promote the unit just created. Will it work?