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 touch trigger

I thought this would be easy but...

In a dungeon of my game, you have to push a rock. When this rock is pushed on an event, a switch is triggered. i thought this would be very easy, just use the event touch trigger. But, when I do that, nothing happens... It only responds if the hero touches the platform, if the rock touches the platform, nothing happens. As if I used the player touch trigger, but I didn't :s
 

Fusty

Sponsor

I'll try to explain it:

You start by making 2 variables for the rock:

01.png


Call the first one Rock X, and the second one rock Y, both of them will look like the picture above.

Next, make 2 variables for the switch where the boulder must be pushed on as well, call them Switch X and Switch Y.
They should also look like the picture above.

Your event should look like this now:

02.png


Now make a conditional branch like this:

03.png


Inside that conditional branch, make another conditional branch and make it the same as the last except this time you have to use the Rock Y and Switch Y variables.

Now your event will look like this:

04.png


Now it should work.
Hope this helps.
 
Gonna try that later today, normally I'll get it working this time. Thanks!

edit: it works! ^^ Now i'm gonna try to make it so that the hero has to stand somewhere too. I understand the structure now, so shouldn't be to hard.
 

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