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.

How to Verify if an Event is On X,Y Map?

Well, To make a Pushable Box Event, you need to define the X n' Y variable, and put in a Conditional...and blah..blah.. but there is not a better easy scripted form to make that.. for example:

If event1 is on (x,y), in the conditional branch?, to evade the use of variables?.

Thanks.
 
Variables are the best way to go. If you upload what you are talking about, i can put it in with those lovely things called *comments* to show you how it is done. Actually it is rather easy.
 

poccil

Sponsor

Here is a way to do it from script:

Code:
class Interpreter
 def onEvent?
  evt=get_character(0)
  return ($game_player.x==evt.x && $game_player.y==evt.y)
 end
end

The function onEvent? could then be used in a Conditional Branch event command:

Code:
@> Conditional Branch: Script: onEvent?
  @> Comment: Player is on this event.
  @>
 : Branch End
 

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