Need help of script with a button

This forum is meant for posting anything related to Adventure Maker that doesn't fit in the other forums.Please post technical questions in the Technical Support Forum!

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

Need help of script with a button

Postby sofie » Wed Mar 03, 2010 10:05 pm

Hello! I need some script with a button!!!. Let me explain:

I have a living room with a button that leads to a door, and the door has a panel with a ball inside. In fact, the player has to return to the room to take a screwdriver and then go to the door to open the panel and get the ball.

I have two doors screens: one with the closed panel and the other with the opened panel (see images attached if you want)

The thing is that that door is also the final door. I need two options for the same button: if the player has taken the screwdriver and opened the panel and so has the ball, then go to the screen of the door with the panel opened and if not, go to the screen with the panel closed.

Ufff! I don't know if I have explained this properly... well, I have thought to put a script like this (setting variables for the objects before):


:oops:

IfVariable screwdriver=1 + ball=1 Then
Action.GoToFrame "openpanel"
Else
GoToFrame "closedpanel"
End If

:oops:

But it doesn't work, obviously, because I'm new with this... Help, please!! and thanks to read all this, hahaha!
:D
Attachments
room.jpg
room.jpg (60.67 KiB) Viewed 3145 times
open.jpg
open.jpg (40.13 KiB) Viewed 3145 times
closed.jpg
closed.jpg (41.45 KiB) Viewed 3145 times
sofie
New Member
 
Posts: 3
Joined: Wed Mar 03, 2010 9:36 pm

Re: Need help of script with a button

Postby ShadowHunter » Thu Mar 04, 2010 11:20 am


IfVariable screwdriver=1 + ball=1 Then
Action.GoToFrame "openpanel"
Else
GoToFrame "closedpanel"
End If



Use:

Code: Select all
If screwdriver = 1 And ball = 1 Then


Good luck,

ShAdOwHuNtEr
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium

Thanks!!

Postby sofie » Thu Mar 04, 2010 5:47 pm

Thank you very much! It was easy!
sofie
New Member
 
Posts: 3
Joined: Wed Mar 03, 2010 9:36 pm

Postby ShadowHunter » Thu Mar 04, 2010 8:47 pm

You are most welcome, glad it works :D
User avatar
ShadowHunter
Forum Admin and Games Page admin
 
Posts: 1304
Joined: Fri Jun 06, 2003 10:37 pm
Location: Belgium


Return to Adventure Maker General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests

cron