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.

Event Question

Ok heres the scenario. I want to have boulders coming from the top of the screen that send you back to the start of the map when you touch them.

What I currently have is the movement for the boulders, which is to have them on Set Move Route going down with freq. speed, etc. What I cannot figure out is how to make the game recognize that you and the boulder collided. This is probably a DUH answer, but there is no IF hero touches boulder THEN command.

Also, I have event commands that make the boulder reappear at the top of the screen after it reaches the bottom.

Thanks.
 
Chainsaw Cheeze":34lzgr9i said:
..Event touch...the bottom left hand corner......then just make a "Teleport" where you go back to the beginning
No, that wouldn't work out right. You have to have the boulder's on parallel process with a movement command for them to roll down the hill. Now, I'm not sure if this is fool proof but you could try this.
Use variables to store the player's and the boulder's X and Y coordinates.
Use the loop command (pg. 1).
Inside put two conditional branches that have
  player's X = Boulder's X?
  player's Y = Boulder's Y?
so that it looks like this:

Code:
@>Loop
  @>Control Variables: [0001: Player X] = Player's Map X
  @>Control Variables: [0002: Player Y] = Player's Map Y
  @>Control Variables: [0003: Boulder X] = EV(boulder's event name)'s Map X
  @>Control Variables: [0004: Boulder Y] = EV(boulder's event name)'s Map Y
  @>Conditional Branch: Variable [0001: Player X] == Variable [0003: Boulder X]
    @>Conditional Branch:Variable [0002:Player Y] == Variable [0004: Boulder Y]
      @>Break Loop
    : Branch End
    @>
  : Branch End
  @>Wait 1 frame
  @>
 : Repeat Above
@>Transfer Player

Make sure that you uncheck the box in the conditional branches. Hope this works for you!
Good Luck!!  :thumb:
 
You don't need the boulder on parallel processing. Have a CUSTOM move route that sets it going downhill, then set it to Event Touch. In the Event List put the "Transfer Player" stuff.

Another method is to have an invisible event in the upper left corner thats set to parallel processing, and moves every single boulder through move events. Either way, it'll make the boulders free for their commands.
 
Yeah. I see how that would work. I was thinking that the boulders had a move event command. Although if you used the seperate event to check the XY coords. it would have a lot of conditonal branches and probably would get confusing. It would be easier to put the conditionals in the event seperatly. If they have their own move custom route, then yeah, it would be much easier to just set the event to player touch and have a transfer player.
 
Well, here's what I'd do. Have one event set to parallel process, which checks the player's x and y values and sets them to variables.

For each boulder, make three event pages.
The first page should just be blank, with only the event graphic of the boulder.
The second page should be triggered when one of the player location variables is <= / >= a certain number. This should have the boulder graphic, as well as a custom move route that eventually turns on self switch A. Set the event processing to Event Touch, and work out your stuff from there.
The third page should again be blank except for an event graphic, and be triggered by Self Switch A.
 
No, Gratheo. You would do it my way. And make it a custom route right above those and make it move how you want it to...Trust me..I've been working on events my whole rmxp career. I'mma event master..I'll be a legend once I finish my ABS.
 
Well, you don't have to brag about it. You weren't very helpful in your previous post, just said something about event touch, which I explained more thoroughly.

Anyway CrymsenTears, try one of the methods. If it were me, I'd use the event touch method, because you don't use any variables or switches and you don't have to use conditional branches to check positions for every boulder.

Good luck :wink:
 

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