trystero49
Prince
- Joined
- Apr 30, 2012
- Messages
- 515
I took some of Spatzimaus's code from this page: http://forums.civfanatics.com/archive/index.php/t-468234.html
and I tried to adapt it to make it work for my mod. I have a specific unit (UNIT_QAMUTIQ) that I'm trying to get to Ice Walk. Ice Walk and Embarkation go together like a balloon and a porcupine, so I've decided to just not award Embarkation to the Qamutiq. First I tried making a new combat class for the qamutiq and not awarding embarkation to that combat class (I made a thread about this). It works fine, but no combat animations play. I'm trying to get this to work and still have combat animations. Here's my modified code:
function Remove_Embark_From_Qamutiq(iPlayer,iUnit,hexVec,unitType,cultureType,civID,primaryColor,secondaryColor,unitFlagIndex,fogState,selected,military,notInvisible)
if(iPlayer ~= -1) then
pPlayer = Players[iPlayer];
if(iUnit ~= -1) then
pUnit = pPlayer:GetUnitByID(iUnit);
pType = pUnit:GetUnitType();
if pType == "UNIT_QAMUTIQ" then
pUnit:SetHasPromotion(GameInfoTypes.PROMOTION_EMBARKATION,false);
end
end
end
end
Events.SerialEventUnitCreated.Add(Remove_Embark_From_Qamutiq)
VFS = False and I used InGameUIAddin, but it doesn't work. What have I done wrong?
I also want to ask how to use FireTuner to "unpack" these events, because I'm not sure how, and I want to look up the arguments for certain events.
Thanks
and I tried to adapt it to make it work for my mod. I have a specific unit (UNIT_QAMUTIQ) that I'm trying to get to Ice Walk. Ice Walk and Embarkation go together like a balloon and a porcupine, so I've decided to just not award Embarkation to the Qamutiq. First I tried making a new combat class for the qamutiq and not awarding embarkation to that combat class (I made a thread about this). It works fine, but no combat animations play. I'm trying to get this to work and still have combat animations. Here's my modified code:
Spoiler :
function Remove_Embark_From_Qamutiq(iPlayer,iUnit,hexVec,unitType,cultureType,civID,primaryColor,secondaryColor,unitFlagIndex,fogState,selected,military,notInvisible)
if(iPlayer ~= -1) then
pPlayer = Players[iPlayer];
if(iUnit ~= -1) then
pUnit = pPlayer:GetUnitByID(iUnit);
pType = pUnit:GetUnitType();
if pType == "UNIT_QAMUTIQ" then
pUnit:SetHasPromotion(GameInfoTypes.PROMOTION_EMBARKATION,false);
end
end
end
end
Events.SerialEventUnitCreated.Add(Remove_Embark_From_Qamutiq)
VFS = False and I used InGameUIAddin, but it doesn't work. What have I done wrong?
I also want to ask how to use FireTuner to "unpack" these events, because I'm not sure how, and I want to look up the arguments for certain events.
Thanks