Hi! Welcome to the forum for Platinum Arts Sandbox Free 3D Game Maker. I currently have the forums locked as I am attempting to properly update them.

In the meantime please join the new Discord Server!

If you have any questions please e-mail me through the Platinum Arts website.

Script for locking and unlocking a door.

Having issues not related to a specific Sandbox game mode? Get help here!
Please also read the rules for support when posting support requests.
Failure to comply with the forum rules may result in your topic being locked without resolution.
Locked
davidjanet73
Member
Member
Posts: 2
Joined: June 9th, 2010, 8:44 am
Name: David

Script for locking and unlocking a door.

Post by davidjanet73 »

Is there a script for us to lock and unlock the door? Let's say the door is locked, we'll need a key to open it. If you got the key, you can unlock the door, if you got nothing the door won't open.
Is it possible? Thanks for solutions.
arcones
Support Team
Support Team
Posts: 2734
Joined: January 13th, 2010, 12:42 pm
Name: Timothy
IRC Username: I use Steam
Location: Looking over your shoulder...
Contact:

Re: Script for locking and unlocking a door.

Post by arcones »

I believe this would help:

Code: Select all

    key1 = 0

    level_trigger_1 = [
       if (> $key1 0) [
          trigger 1 1
          echo "You unlock the door with the key."
       ] [
          trigger 1 0
          echo "The door is locked."
       ]
    ]
    level_trigger_2 = [
       key1 = (+ $key1 1)
       echo "You picked up a key."
    ]
Here's the topic, Venima's post's are the ones you need ;) :Some Questions

Hope that helps!
Arcones :geek:
Image
Want a user bar like this one? PM Leo!
Locked