Charas-Project
Game Creation => Requests => Tutorials => Topic started by: Ben on March 02, 2008, 09:13:34 PM
-
So I am trying to make abasic puzzle minigame in which you need to slide four boulders, Onto certain locations on a map, to unlock a door.
I have my moveable objects made...
And i guess what im having problems with, It making it so that when they are moved to Any one of four locations, It sets of a switch or variable.
The Slideable Events are named STATUE1,2,3 and 4
Could anyone help good ol gem figure out how to do this correctly? Im racking my brains here
-
Easy peasy lemon squeezy.
Basically you need to set aside 2 variables per statue (Making 8 variables) one for X and one for Y position (Like Statue1X, Statue1Y etc.)
Then set up a parallel process event and make it set each variable to it's corresponding object's X or Y value (Set Statue1X to Statue 1's X co-ordinate) and all that for each of the 8 variables. After that, make a bunch of conditional branches inside each other to check whether the statues's X and Y variables match up to the points they're supposed to be in.
If for instance, you need statue 1 to be at location 5X 7Y it would say:
<>Branch if var [001:Statue1X] is 5
<>Branch if var[002:Statue1Y] is 7
End
End
<>
Make branches to test if every of the 8 variables is where you want 'em and then set the command to open the door or whatever.
-
thank you kindly sir.
I knew id be in for branches and variables....I just wasnt sure exactly how to implement them correctly.