I'm trying to make a local variable integer to check to see if the player picked something up and if they didn't, to display a message once they enter an area.
Eh, here's the code:
void OnStart()
{
AddLocalVarInt("LeverTouchCheck", 0);
SetEntityPlayerInteractCallback("lever_small_lever_1", "LeverCheck", true);
AddEntityCollideCallback("Player", "ScriptArea_4", "MissingLever", true, 1);
}
void MissingLever(string &in asParent, string &in asChild, int alState)
{
If (GetLocalVarInt("LeverTouchCheck") == 0)
{
SetMessage("Message", "Hint04", 4);
}
}
void LeverCheck(string &in asEntity)
{
SetLocalVarInt("LeverTouchCheck", 1);
}
The error report is confusing... I could have sworn it changed a few times in awkward ways. I hope you can help. :/