Getting the ID of "This common event". - Printable Version +- Save-Point (https://www.save-point.org) +-- Forum: Games Development (https://www.save-point.org/forum-4.html) +--- Forum: Code Support (https://www.save-point.org/forum-20.html) +--- Thread: Getting the ID of "This common event". (/thread-1920.html) |
Getting the ID of "This common event". - PK8 - 09-16-2009 Heya, is there a way I could obtain the ID to "This common event"? Y'know how map events have @event_id? Is there something like that for common events? Getting the ID of "This common event". - Yin - 09-16-2009 $data_common_events[common_event_id] I think. Don't hold me to that. I'm still learning. Getting the ID of "This common event". - PK8 - 09-16-2009 Doesn't work. ;_; *doesn't hold Yin to it* Getting the ID of "This common event". - DerVVulfman - 09-16-2009 Obtain?? Common Events are called by map events are generally parallel processes. I mean you may be able to 'pass' the id of a common event into a script call to run an event (if you're good enough), but I never heard of one needing to retrieve the ID of a common event itself. You could set up an event in each common event: CONTROL VARIABLES[0001: Event-ID] set = '1' or whatever for each common event. Then when the common event is run, it changes that one variable (#1) to that value. Then within the script, you can access that through $game_variables. Getting the ID of "This common event". - Yin - 09-16-2009 Oops. Sorry. Getting the ID of "This common event". - PK8 - 09-16-2009 It's alright, Yin. :P Getting the ID of "This common event". - Zeriab - 09-17-2009 That's evil punk. You should tell when you get a solution. Here is an XP solution where I overwrite setup_starting_event rather than alias it because the other way will be computationally more intensive. Yes, the structure is not set up to allow the id of the running common event to be retrieved easily >_< Code: class Game_CommonEvent *hugs* |