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.

[RESOLVED] Conditional Branch - If Terrain Tag = x ?

Jason

Awesome Bro

Hello, I'm kind of baffled on a part of my game, what I want is if you stand on a certain terrain tag, something will happen, at the minute, I've got it so every tile I need, has an event on it, so it will most likely cause lag for people, is there a way to get around this with a simple conditional branch script ? Or should I be looking for Antilag scripts ? Lol.

Thankyou.
 

Jason

Awesome Bro

Hevendor":3obe8fra said:
Not sure I understand, but you can use the Change Variable event command to change a variable to a certain character's terrain tag. Don't need any script?

I'm not sure I understand what you mean with that either, please explain more :thumb:
 

mawk

Sponsor

If I recall, there's a "Terrain Tag" option under Conditional Branch anyway. If there's not, then it's somewhere -- I remember it was used to great effect in a game I had the pleasure of messing with.
 
In a single parallel event on the map:

Code:
@>Control Variables: [0010: Terrain] = Player's Terrain Tag
@>Conditional Branch: Variable [0010: Terrain] == 2
   @> Do what you need to do here
  : Branch End
@>
 

Jason

Awesome Bro

Brewmeister":3cwvrkj8 said:
In a single parallel event on the map:

Code:
@>Control Variables: [0010: Terrain] = Player's Terrain Tag
@>Conditional Branch: Variable [0010: Terrain] == 2
   @> Do what you need to do here
  : Branch End
@>

So that means if I walk onto anything with a Terrain tag of 2, [xxx] happens ?
 

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