EVENT GROUP CONCEPT

Posts

Pages: 1
Just thinking aloud here really. Wouldn't it be good if when you create an event (RPG Maker), you could give it an numbered ID and thus making it part of a "group" of events (0 would be no group). That way, another event could have for example, Condition Branch, touch, or within a certain number of tiles of event belonging to event group x= will do whatever etc... Events could interact with each other differently according to their group IDs. You could even give these ID's to different party members...

I think this could possibly facilitate real-time combat, or any number of things for that matter. Maybe this could already be possible by giving a certain event a variable... Anyway, any thoughts?
CashmereCat
Self-proclaimed Puzzle Snob
11638
Yes. I have been wanting this for a while. There is such a thing as assigning an event a private variable, though. I think you do something like

@variable = 0


And that variable will exist only for that event. So you can set the @group variable to a certain group number. The hard part is then querying every single event in, say, a map for a certain variable. That will take too long of a time.

So if there was a way you could easily group events via variables, that would definitely be nice. I'm sure some code genius can do it.
Marrend
Guardian of the Description Thread
21806
If it's a property that events would have in a general sense, I'd say you'd have to write up some code that gives events said property. Which would probably occur somewhere...

class Game_Event < Game_Character
  #--------------------------------------------------------------------------
  # * Public Instance Variables
  #--------------------------------------------------------------------------
  attr_reader   :trigger                  # trigger
  attr_reader   :list                     # list of event commands
  attr_reader   :starting                 # starting flag
  attr_reader   :group_id                 # event group identifier

...here. At least, in RPG Maker VX Ace. Then, you would probably access them with something like...

i = 0
for $game_map.events[i].group_id
  # stuff
end

...or something like that? I'm not really sure, to be honest.

*Edit: I also barely started scripting in Ruby myself, so...
Pages: 1