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.

Switch only active when player/object is on top of it.

  Okay, well, I have a switch that is only triggered when the player or an object is on top of it. Think of LoZ Ch. 1 or MotW Arc IV. As soon as nothing is on top of the switch, it turns back off again. I know a simillar question was asked here, but that's a bit different. Does anyone know what the event might look like? Thanks. :thumb:
 
there are a bunch of ways to do it.

the easiest would just be to put foru events around it so when you step off of it the switch turns back off.

if you're tracking a boulder or something, then just use coordinate variables to see if it matches up with the switch.
 
  The problem there is that it checks for both, i.e. if the player pushed the boulder onto the switch, he could trigger the event walking off or back up again and the switch would turn off with the boulder on it.
  Unless you know a way around this, it would be quite helpful to see what the event might look like. Thanks. :thumb:
 
just use coordinate variables then

parallel process. IF VARIABLE OF HERO is the same as VARIABLES OF SWITCH then switch ON else IF VARIABLE OF BOULDER is the same as VARIABLES OFSWITCH then switch ON else SWITCH OFF

pretty simple
 

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