LittleRedPoint
Slaver
This is a code from snaitf's unit allegence mod. As i understand, this create new unit what the loser's unit was. Question is, how to create sertain unit what you have in unit list? For example unit type UNIT_WORKER or UNIT_SLAVE?
newUnit = playerX.player.initUnit(pLoser.getUnitType(), pLoser.getX(), pLoser.getY(), UnitAITypes.NO_UNITAI)
what must be written in this line? "pLoser.getUnitType()" how you call unit from list?
How to create sertain unit by phyton?
I'm not a good script writer, i want to mod snaift's code to get slave unit if you win a battle. To have 20% or 30% chance if your civic is slave.
newUnit = playerX.player.initUnit(pLoser.getUnitType(), pLoser.getX(), pLoser.getY(), UnitAITypes.NO_UNITAI)
what must be written in this line? "pLoser.getUnitType()" how you call unit from list?
How to create sertain unit by phyton?
I'm not a good script writer, i want to mod snaift's code to get slave unit if you win a battle. To have 20% or 30% chance if your civic is slave.