PDA

View Full Version : Anyone got any ideas how to reference OnGameEvent?



SoW Reddog
Jun-25-2014, 13:42
I've seen reference to this in various errors, so am presuming that above all the Onxxxx events individually, there's an OnGameEvent method through which is passed the GameEventID referenced in Bliss's post the other day.

Anyone know how to expose this method? It looks like it's in Maddox.game ??

ATAG_Colander
Jun-25-2014, 14:00
That's just the function that calls all the OnXXXX functions depending on the event type.

SoW Reddog
Jun-26-2014, 02:28
Yeah, I know. I'm thinking it'd be easier and clearer to use that to direct some of my event based code than using the OnXXXX individually. Was thinking that I could have a ReddogOnXXXX for each one, and just paste into each mission cs a switch block for OnGameEvent which pointed to the relevant ReddogOnXXXX. Doesn't matter if we can't get to it, just trying to streamline the maintenance of lots of missions at once.

ATAG_Colander
Jun-26-2014, 12:02
There's a way to include an external file on the mission script (don't remember exactly how now).
What you can do is have all the common code in that external file and just include it from the main mission. That way you'll have to change only that one file.