Go back to modding
There are two Kind of Event calls:
Postevent(string eventname, int delay, string arguments, [arguments])
Event(string eventname, string arguments, [arguments])´
And Postevent will be "scheduled" and will run paralell to the other functions.
And Event will be done before the rest of the code continues, so ist similar as an function call.
In an Event function you will often see the GetEventData() function. This function picks up the arguments which are given.
In the string arguments you declare which arguments are passed to this Event.
You use the following letters:
l = int
s = string
i = aref
f = float
Those are the ones I know from the top of my head at least.
So say you want to pass a character index and experience and skillname you do it like this:
int idx = 0;
int exp = 100;
string skillname = "cannons";
You can also use the function(I believe) SetEventHandler(string eventname, string functionname, bool something)
I dont know what the something is, I haven't found out what is different. Maybe it has something to do with if it is allowed to run paralell or not.
If you use the SetEventHandler you can also use the DelEventHandler(string eventname, string functionname) to remove it again.
Say we set an Event handler for the function void fubar() and the Event Name is myevent then the fubar function would look like this:
int idx = GetEventData();
int exp = GetEventData();
string skillname = GetEventData();
SomeFunctionToUseIt(idx, exp, skillname);