Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > Zelaron Gaming > RPGMaker

 
 
Thread Tools Display Modes

 
Unhappy Help me with variables please
Reply
Posted 2003-10-11, 09:14 AM
ok i understand switches and that but what are variables for whats the difference between them and switches? And i would like to know how to use variables well and what things there best for doing and.1. can someone tell me how to make an event with more than 2 preconditions like- you have to hit all 4 switches to open a door

thanks in advance
"Try not! Do or do not, there is, no try!" Quote Yoda.
Old
Profile PM WWW Search
05thouldm is neither ape nor machine; has so far settled for the in-between05thouldm is neither ape nor machine; has so far settled for the in-between
 
 
05thouldm
 



 
Reply
Posted 2003-10-11, 12:31 PM in reply to 05thouldm's post "Help me with variables please"
05thouldm said:
ok i understand switches and that but what are variables for whats the difference between them and switches?
Switches have an on/off state, while variables have a numeric value. You can add/subtract/whatever to a variable, as well.

Quote:
And i would like to know how to use variables well and what things there best for doing
They're best used for.. well.. anything that has to do with a number. You can keep track of something (say, how many times you tried to open a locked chest), set something to a value ("You've killed 10 slimes in the arena, so you've earned 10 potions!").. basically, anything that has a number assigned to it (including your current Map/X/Y position) can be useful with a variable.

Quote:
and.1. can someone tell me how to make an event with more than 2 preconditions like- you have to hit all 4 switches to open a door
I'll call the switches to open the door "keypads" so you won't be confused when I refer to one instead of the on/off switch.

You can use:

1) An parallel-process, 2-page event that keeps track of when all the switches are used (page 1 would use a branch-within-a-branch-within-a-branch-within-a-branch style for checking everything.. setting a switch for page 2 to be activated)

(I don't have RPGMaker where I'm at, so it's time for pseudocode.. this is on Page 1)

<> If switch (0050:Keypad1_Switch) is ON
...<> If switch (0051:Keypad2_Switch) is ON
......<>If switch (0052:Keypad3_Switch) is ON
.........<>If switch (0053:Keypad4_Switch) is ON
............<>Turn switch (0054:Door_Is_Open) ON
.........<>End
......<>End
...<>End
<>End

===============

2) A variable system, where each keypad adds 1 to a variable, then switches itself off.

(This is just one of the keypads.. just change the switch name for each one. Page 1 is first, obviously.)

On key press, No preconditions

<> Turn switch (0030:Keypad1_Switch) ON
<> Variable (0010:Keypad_Total): Add 1
<>

(Page 2)

On key press, Precondition (0030:Keypad1_Switch) is ON

<> Message "You already activated this switch.. pressing it again won't do anything."
<>

(Now, this is the door event)

(Page 1)

On Key press, no preconditions, image is closed door

<> Message "Cube: This door is locked. Looks like we need to hit 4 switches."
<>

(Page 2)

On Key press, precondition (0010:Keypad_Total) is equal to 4, below hero, image is blank

<>

=====================

Quote:
thanks in advance:D
No big deal, this is about the only forum I actually POST in.
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 



 
Reply
Posted 2003-10-14, 04:11 PM in reply to 05thouldm's post "Help me with variables please"
Thank you that really helps now I can use variables too and sorry i didnt know that i would have to start a new thread for each question but i will in future. My game can now have better puzzles and stuff thanks again!
"Try not! Do or do not, there is, no try!" Quote Yoda.
Old
Profile PM WWW Search
05thouldm is neither ape nor machine; has so far settled for the in-between05thouldm is neither ape nor machine; has so far settled for the in-between
 
 
05thouldm
 
 

Bookmarks

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules [Forum Rules]
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 04:53 AM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.