![]() |
Help me with variables please
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:D |
Quote:
Quote:
Quote:
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:
|
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!
|
All times are GMT -6. The time now is 12:25 AM. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.