How to use Integer Variables...I'm clueless

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

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

How to use Integer Variables...I'm clueless

Postby Mr.C » Sat Jul 16, 2011 12:38 am

Hey there,

I'm wondering how I would use, and and understand variables for creating puzzels , that was explained in plain english? This will be a real help.

Thanks :?
Mr.C
Member
 
Posts: 35
Joined: Sun Aug 31, 2008 9:02 pm

How to use Integer Variables...I'm clueless

Postby Mr.C » Sat Jul 16, 2011 5:04 am

Hey,

Sorry I wasn't clear in my topic, but what I ment to say was, I've tried to understand variables by looking at sample games, and reading the help files but I don't seem to get it! I need some help with this simple issue.

Thankyou :(
Mr.C
Member
 
Posts: 35
Joined: Sun Aug 31, 2008 9:02 pm

Postby reneuend » Sat Jul 16, 2011 5:35 am

a variable is just a place to store a value. In the case of an integer variable, you are storing whole numbers.

It's best to start with a very simple puzzle. I would suggest using an integer to store 0 for off and 1 for on. More complex puzzles would have several values to represent more than just on and off.

with the variable set to 0 or 1, it would represent a toggle switch.

An example might be a light switch. If the user clicks on a hotspot that represents a light switch, you would check the value of the variable. If it is set to 0, then when the click on the switch, display a lit up light. If the variable is set to 1, then when the user clicks on the switch, set the light to off. Be sure to set the value of the variable each time they click on the switch.

Adventure maker allows you to do this example without writing code. In fact, I think in the AM manual, it shows the concept of turning a light on and off.

I also created a couple Youtube videos on something like this.
Simple example:
http://www.youtube.com/watch?v=BI1LiPKWETA

Sequence example:
http://www.youtube.com/watch?v=1xrLS2U-pEA
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2762
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA

How to use Integer Variables

Postby Mr.C » Sat Jul 23, 2011 2:34 am

Hey there reneuend, :)

I sort of learned how to use variables by looking at the sample games that have switches in them, however now, I would like to know how to make variables work so the player must pull four switches in a numeral order like 2,3,1,4 then activates a leaver when pulled, unlocks a door.

Mr.C
Mr.C
Member
 
Posts: 35
Joined: Sun Aug 31, 2008 9:02 pm

Postby reneuend » Sat Jul 23, 2011 3:05 am

Hey Mr. C,

Take a look at this tutorial:

http://www.adventuremaker.com/phpBB2/viewtopic.php?t=6080
---


Image
Image
User avatar
reneuend
Administrator
 
Posts: 2762
Joined: Sat Nov 22, 2008 8:37 pm
Location: Midwest Cornfield, USA


Return to Adventure Maker Technical Support and Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests

cron