Hey all, so i've run into a little problem..
what would the script look like if i wanted to make it that when the player lits a candle, it deactivates a monster ?
i dont think SetEntityPlayerInteractCallback would work, because then the player would deactivate the monster just by clicking on the candle without setting it lit (no tinderboxes)
i'm preety basic with scripting so... i have no idea how to make it work.
edit: so i tried messing around with the "if statement" to see if i could use it but all i got was a bunch of errors xD this is what i tried
void warning(string &in asTimer) //candle off in opozorilo
{
PlaySoundAtEntity("", "guardian_activated.snt", "Player", 0, false);
SetLampLit("candlestick01_1", false, true);
StartScreenShake(0.1f, 0.1f, 1.0f, 1.0f);
if(SetLampLit("candlestick01_1") == false)
{
SetMessage("DONTKNOWIFWORKS", 10);
}
else
{
SetEntityActive("closetgrunt", true);
ShowEnemyPlayerPosition("closetgrunt");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_1", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_2", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_3", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_4", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_5", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_6", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_7", 0, "");
AddEnemyPatrolNode("closetgrunt1", "PathNodeArea_8", 0, "");
AddEnemyPatrolNode("closetgrunt", "PathNodeArea_9", 0, "");
AddTimer("", 10, "open");
}
}
so yeah, here i wanted to test i know how to use "if statement".. what i wanted to achieve was that if the candle was NOT lit i get the message "DONTKNOWIFWORKS" otherwise.. well you can see the rest