I've spent the morning getting a lever to function as a door opening switch (incidentally, a process that proved to be far more difficult than I expected it to be, ha).
My next step is to make that lever apply the 'Stunned' status to whichever character uses it.
Easy right?
My code:
IF
CharacterItemEvent(_Player,ITEM_EFS_ChestLeverOut,"ChestDoorOut")
THEN
CharacterApplyStatus(_Player,"STUNNED",10.0);
CharacterPlayEffect(_Player,"FX_GP_Death_Lightning_A_Medium");
The lightning FX plays correctly. No status change whatsoever.
So I go to look at the code used for the Black Cove area with the dozen different 'fun' buttons.
From the Main campaign Story Editor:
IF
CharacterItemEvent(_Player, ITEM_CYS_BC_LeverPretty, "activated")
THEN
CharacterPlayEffect(_Player, "FX_GP_Death_Lightning_A_Medium");
CharacterSetHitpointsPercentage(_Player, 1);
CharacterApplyStatus(_Player, "STUNNED", 18.0);
CharacterDisplayText(_Player, "GLO_ObviousActivated");
That's... very similar!
Can anyone enlighten me as to why I can't manually apply a status effect?
I've double checked the lever/button itself on the Black Cover map and I can see nothing special about it.