Help With Locked/Unlocked Door

This forum is meant for requesting technical support or reporting bugs.

Moderators: time-killer-games, Vengeance66, Candle, reneuend, GM-Support

Help With Locked/Unlocked Door

Postby mtdwgjm » Thu Dec 06, 2007 1:06 am

Hi, im kind of new with this, but i need help with a door.

so if u pick up the key, set a variable on to let the door open

if u click the door, if variable is 0, say door is locked, if it is 1, go to a new frame w/ door open

if someone could help me with this, it would be great!

thanks
mtdwgjm
New Member
 
Posts: 5
Joined: Thu Dec 06, 2007 1:04 am

Postby Mystery » Thu Dec 06, 2007 1:30 am

Welcome to the forums mtdwgjm :)

It depends if you are using the free version and are working without coding, or if you have the full version and use VBScript.

Go to the hotspot properties of the hotspot with the key, and set "Change the value of the variable to 1 when the hotspot is clicked" on the Variables tab.

After that:.

Without coding:
Make 2 hotspots over the door:
Create one hotspot, then go to the hotspot properties; go to the Variables tab, and set it to be visible if the variable is =1. Then go to the General tab, and set to which frame the player should go.
Create a second hotspot (on top of the first hotspot), and set it to visible if the variable=0. Then check the "Display a message" on the Actions tab, and add your message there.

With script:
Create one hotspot over the door, go to the Advanced tab of the hotspot properties, and add:

Code: Select all
If MyVariable=0 Then
  Message "The door is locked."
Else
  Action.GoToFrame "Frame_Name"
End If


whereas MyVariable can be replaced by the custom name of your variable, and Frame_Name by the custom name of your frame.
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby mtdwgjm » Thu Dec 06, 2007 1:40 am

thank you so much, that was a rather quick response :P
mtdwgjm
New Member
 
Posts: 5
Joined: Thu Dec 06, 2007 1:04 am

Postby Mystery » Thu Dec 06, 2007 1:45 am

You're welcome, good luck :)
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland

Postby mtdwgjm » Thu Dec 06, 2007 2:46 am

one more question:

im making a key, and the backround of the key really messes everything up, is there a way that there is no backround to the key so the frame is its backround? because the bmp file that is the key is square, so im not sure how to make its backround invisible if possible. cuz like when you drag it to a door, its a key with a big black square around it, and it just doesnt look right.

thanks if you can help :)
mtdwgjm
New Member
 
Posts: 5
Joined: Thu Dec 06, 2007 1:04 am

Postby Mystery » Thu Dec 06, 2007 2:51 am

You can make the background transparent with some image software.

For example Irfan View http://www.irfanview.com/
or Gimp http://www.gimp.org/
are free and work fine.

But maybe you have already some software on your pc that can do it (e.g. Photoshop)?

Be sure to save images with transparent backgrounds for example as .gif or .ico.
.BMP or .JPG files cannot have transparent backgrounds.
User avatar
Mystery
Forum Admin and Games Page admin
 
Posts: 2990
Joined: Sat Feb 04, 2006 8:12 am
Location: Switzerland


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests