Okay... I have some trouble to make it works and I don't know why.
Here is my code :
Code:
if key=="Premier_CANNIBALE" and value == "oui" then
p = world:GetPlayer()
if p:GetAttribute("masterThief", ACTOR_TABLE_CURRENT) == 0 then
p:SetAttribute("masterThief", ACTOR_TABLE_PERM, 1)
logger:log(p["name"] .. " hulkSmash expired")
p:DisplayMessage("Normal")
if world:GetMissionVar("Francais") == "non" then
world:CombatLog(COMBATLOG_FEW, "<Cr>" .. p["name"] .. " has eaten human flesh. A note have been added in his.her bio.<C->")
else
world:CombatLog(COMBATLOG_FEW, "<Cr>" .. p["name"] .. " s'est nourri.e de chair humaine. Une note a été ajoutée dans sa bio.<C->")
end
end
end
I just added these two lines from your experiments with "Hulk Smash!" perk to see if I could get some results from them. But nothing happened.
Code:
logger:log(p["name"] .. " hulkSmash expired")
p:DisplayMessage("Normal")
In my example, The Campaign variable "Premier_CANNIBALE" is checked, it then successfully apply the perk, but no message are displayed in the combat log, nor above the caracter.
I must say that "Francais" is also a Campaign variable. I entered it correctly?
Did I miss something there? I tried setting up my messages to "Few" and also "All".