Hello All,
So I'm trying to make a switch which requires both the red and blue key (script at the bottom) to activate, however, if I have the switch set to activate once, then when I try and use it without the keys it prints the message, plays a noise, changes texture, and then can't be interacted with again. If I have it set to repeatable, then the floors and ceilings keep moving on repeated presses which I don't want either.
Is there a simple way to change the code below to make it so that the switch doesn't activate at all until both keys are obtained (apart from printing the message)? I've tried a few different variations such as reversing the script so that the actual actions happen in the 'else' statement, or trying to terminate the script once the switch has successfully been used but nothing seems to be working. Thanks in advance.
script 12 (void)
{
if (CheckInventory("RedCard") && CheckInventory("BlueCard"))
{
Floor_LowerByValue(57,16,128);
Ceiling_RaiseByValue(58,16,128);
}
else
Print(s:"You need both the red and blue keys.");
}