SetHasPromotion

qqqbbb

Prince
Joined
Sep 25, 2010
Messages
530
These 2 commands don't work:
Code:
pUnit:SetHasPromotion(GameInfoTypes["PROMOTION_ROUGH_TERRAIN_ENDS_TURN"], false)
pUnit:SetHasPromotion(GameInfoTypes["PROMOTION_NO_DEFENSIVE_BONUSES"], false)
Is it a bug in dll?
 
The DLL handles the granting/removing of all promotions in the same way, so if it "doesn't work" for one it won't work for all of them.

(A very few, like embarkation, will keep coming back, but that's a different matter)

Define "don't work"

It's probably either a misunderstanding or something wrong in your own mod.
 
Those 2 promotions were not removed from units that have them. But after I restarted the game it works as expected...
 
But after I restarted the game it works as expected...

Are you trying to edit the Lua files while the game is running and/or without returning to the Mods menu? Because the game does not pick up edits to the Lua files dynamically.
 
Are you trying to edit the Lua files while the game is running and/or without returning to the Mods menu? Because the game does not pick up edits to the Lua files dynamically.

I just reload the game (without returning to the Mods menu) after I edit lua files. And I never had any problems until I tried to remove those 2 promotions.
 
Back
Top Bottom