retroactivegames
Member
EDIT: FOR CLARIFICATION: IM USING GAME MAKER 1.4 PRO
Hey all! Im making a re-imagining for a beloved PS1/Sega Saturn/3DO classic, "CASPER", and I have most everything figured out and working already (Item pickups, health, teleporting, basic switch and door functions, chests, locked key doors, etc) the only thing I'm trying to figure out, is re-creating the multi-switch puzzles found throughout the game!
EX; TO OPEN DOOR- THREE SWITCHES BEGIN IN THE "OFF" POSITION- YOU MUST FLIP THEM : ON, OFF, ON, -OR- 1,0,1 -OR- A+C (SINCE B IS "OFF") TO OPEN THE DOOR.
i figured out 1 switch per door, but I'm stumped on this. If I can solve this, I've got short work ahead. Mainly just graphics ripping and putting animations back together.
I think using an array might solve this? I'm kind of new to game maker, but have made incredible progress so far. This is one of the last really big hurdles. below is an idea of rough code I figure I might use to get this to work:
DOOR OBJECT CREATE EVENT:
open=false;
global.solution[0] = switcha (//these are the names of the 3 switches that need to be flipped)
global.solution[1] = switchb
global.solution[2] = switchc
global.current_button = 0;
STEP EVENT:
IF global.solution[0]=switcha on/true/1 ///so door checks if all 3 switches are in the correct position
global.solution[1]= off/false/0
etc. {
open=true; ///if all three match global solution; ex; on, off, on- then door opens
}
else {
open= false; ////otherwise- nothing. still locked///
}
SWITCH A/B/C CREATE CODE;
ON=FALSE
SWITCH ABC STEP:
IF- place meeting (x,y,player object) && K IS PRESSED- ON=TRUE(OR FALSE, DEPENDING ON NEEDS)-
(So- pressing 'k' "activates" and "turns off" switches. adding or subtracting from its value/ turning false to true and vice versa- every time it is pressed- this should effects door code- and when the correct solution is in effect- the door opens)
THEN- sound and animation plays for switch (i got this figured out)
PIC INCLUDED FOR REFERENCE! ANY HELP GREATLY APPRECIATED! IF AN ARRAY WOULD WORK- OR ANYTHING! PLEASE LET ME KNOW. I WILL TRY AS HARD AS I CAN TO REFRAIN FROM ASKING FOR FUTHER HELP!!! FOR A PERFECT EXAMPLE OF WHAT IM TRYING TO ACCOMPLISH- SIMPLY LOOK UP PS1/SEGA SATURN/3DO GAMEPLAY OF CASPER (1996)!!!
Hey all! Im making a re-imagining for a beloved PS1/Sega Saturn/3DO classic, "CASPER", and I have most everything figured out and working already (Item pickups, health, teleporting, basic switch and door functions, chests, locked key doors, etc) the only thing I'm trying to figure out, is re-creating the multi-switch puzzles found throughout the game!
EX; TO OPEN DOOR- THREE SWITCHES BEGIN IN THE "OFF" POSITION- YOU MUST FLIP THEM : ON, OFF, ON, -OR- 1,0,1 -OR- A+C (SINCE B IS "OFF") TO OPEN THE DOOR.
i figured out 1 switch per door, but I'm stumped on this. If I can solve this, I've got short work ahead. Mainly just graphics ripping and putting animations back together.
I think using an array might solve this? I'm kind of new to game maker, but have made incredible progress so far. This is one of the last really big hurdles. below is an idea of rough code I figure I might use to get this to work:
DOOR OBJECT CREATE EVENT:
open=false;
global.solution[0] = switcha (//these are the names of the 3 switches that need to be flipped)
global.solution[1] = switchb
global.solution[2] = switchc
global.current_button = 0;
STEP EVENT:
IF global.solution[0]=switcha on/true/1 ///so door checks if all 3 switches are in the correct position
global.solution[1]= off/false/0
etc. {
open=true; ///if all three match global solution; ex; on, off, on- then door opens
}
else {
open= false; ////otherwise- nothing. still locked///
}
SWITCH A/B/C CREATE CODE;
ON=FALSE
SWITCH ABC STEP:
IF- place meeting (x,y,player object) && K IS PRESSED- ON=TRUE(OR FALSE, DEPENDING ON NEEDS)-
(So- pressing 'k' "activates" and "turns off" switches. adding or subtracting from its value/ turning false to true and vice versa- every time it is pressed- this should effects door code- and when the correct solution is in effect- the door opens)
THEN- sound and animation plays for switch (i got this figured out)
PIC INCLUDED FOR REFERENCE! ANY HELP GREATLY APPRECIATED! IF AN ARRAY WOULD WORK- OR ANYTHING! PLEASE LET ME KNOW. I WILL TRY AS HARD AS I CAN TO REFRAIN FROM ASKING FOR FUTHER HELP!!! FOR A PERFECT EXAMPLE OF WHAT IM TRYING TO ACCOMPLISH- SIMPLY LOOK UP PS1/SEGA SATURN/3DO GAMEPLAY OF CASPER (1996)!!!
Attachments
-
356.5 KB Views: 12
Last edited: