Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Rock Pushing Puzzle

Hey, I want to create a rock pushing mini game, where you push the block into a hole right... Well I'm kinda confused 'cause I have been pondering for ages now how to create a system such as this...
Do I need a script?
:'(
I'm not usually N00bish but ya know, this ones quite hard. It isn't so much the system, its the problem.
See below for the problem...  xD
 
No need for a script. You can use variables to check positions of each event. I will not go in any further, unless you ask me to do so, because I feel that by trying things out, you will learn things faster compared to when somebody step by step explains everything.
 
Tassadar":o4wny5m5 said:
No need for a script. You can use variables to check positions of each event. I will not go in any further, unless you ask me to do so, because I feel that by trying things out, you will learn things faster compared to when somebody step by step explains everything.
I know how to do the variable thing, but I'm kinda stuck when there are things in the way... Like its a maze aswell... =S For example rock a horizontal and rock a vertical (both variables) will move up and down depending on what way the rock is pushed, but when I push it against a wall, the variable goes up, and the rock doesn't move; messing up the system.
 
Not at all; make something along the lines of:

Code:
@>Set Move Route: This event (Ignore if Can't move)
                                  : $>1 Step Backward

For each rock, and a parallel process:

Code:
@>Control Variables: [0001: X] = [Rock]'s Map X
@>Control Variables: [0002: Y] = [Rock]'s Map Y
@>Conditional Branch: Variable [0001: X] == 5
          @>Conditional Branch: Variable [0002: Y] == 10
                  @> ... //rock falls in hole here
             :  Branch End
          @>
  : Branch End
@>

...to check if the rock is in the right place. That's the base idea, now you should improve it.
 
How do ya mean... It doesn't change? This is the one eventing topic I just don't understand.. Why would it not change if it is inside the event? Sorry for asking so many questions, you're a great help! :D
 

khmp

Sponsor

Ok so let's say the rock event is at map coordinates (1,1) You push it left but there's a wall. If you use something like what Hevendor suggested there won't be a problem. Because even though you pushed it the map coordinate could not have changed because the rock didn't mysteriously go through the wall.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top