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.

Creating an Event

How could i go about making an event based on the players xy position? Basically what I am doing is making a shooting system and I want the bullet to be an event, that way when it makes contact with an enemy it will trigger the enemies commands. Hopefully I don't need any more information than that.
 
Well, I think the way you're trying to do it is alot more complex then it has to be. Since this isn't exactly a script request, I'm not going to make it for you.

But to create an event with scripts is kind of more trouble than its worth when you could just use RPG Maker itself to right-click and create one. Anyways, to create an event all you have to do is this:

Code:
event = RPG::Event.new(x, y) # Your x and y

And there you have a blank event! But, you want to have a certain graphic, so you then have to do:

Code:
event.page.graphic.character_name = "" # You graphic name
event.page.graphic.direction = 2 # Direction
event.page.graphic.pattern = 0 # Pattern

And THEN you have to add what you want the event to do, which is just a pain in the ass... and then you have to get it on the map by adding it to Game_Map. I'm sure someone will cover the rest if you need it. (But I suggest that you find an easier way to do what you have in mind.)
 

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