Computer Science, asked by Anonymous, 8 months ago

Hi all.

I've been working on a level and it's layout is completely done but now I've come to the scripting part.

I must say I'm fairly new to this. I manage to create very simple scripts but now things are getting a bit complicated and I kindly ask your help.

Here's the problem:

There's a locked door in my level which is opened by a nearby switch. When the player presses the 'use' key on the locked door, the following script is activated:

CODE: SELECT ALLscript 2 (void)
{
    sethudsize(640, 480, 1);
    setfont("MSGBOX01");
    hudmessage(s:"a"; HUDMSG_FADEINOUT, 2, 0, 320.0, 60.0, 4.0, 1.0, 1.0);
    setfont("SMALLFONT");
    hudmessage(s:"this door is opened elsewhere.";
               HUDMSG_FADEINOUT, 1, CR_GREEN, 285.0, 50.0, 4.0, 1.0, 1.0);
}


When I press the switch to open the door, this script is activated:

CODE: SELECT ALLscript 3 (void)
{
    PolyObj_RotateLeft (5, 10, 60);
    ThingSound (5, "DoorOpen", 255);
}

Now the door opens, but when I press 'use' on the opened door script 2 runs again, displaying the message that the door is opened elsewhere.

Now my question is:

Is there a way to terminate script 2 after script 3 is executed so that the message does not longer appear after the door has been opened?​

Answers

Answered by Anonymous
1

Answer:

Holla....

Explanation:

: )

Similar questions