No this is not possible. Not directly to be exact. Event functions get the "my" pointer of the entity which triggered the event. so to pass your 5 to the event, do this:
Btw if you are going to do so much waiting you should call out of the even and maybe lock the event.
Orginal Code by Uhrwerk
Code:
/*
* Stops the entity from receiving events of type e_type
* until no instances of f are running for that entity.
*
* f: The function to be waited for.
* e_type: The type of events to be disabled.
*/
void event_lock(void* f,fixed e_type)
{
if (!my)
return;
my->emask &= ~e_type;
while (proc_status2(f,me) != 0)
wait(1);
my->emask |= e_type;
}
function this_event()
{
if(event_type == EVENT_IMPACT)
{
beep();
event_lock(this_event, ENABLE_IMPACT);
wait(my.skill88);
}
}
// OR
function call_out_to_wait(ENTITY* event_ent)
{
ENTITY ent_event_ent =event_ent;
wait(my.skill88);
...do more stuff....;
}
function this_event()
{
if(event_type == EVENT_IMPACT);
{
beep();
call_out_to_wait(you);
}
}
Re: event_type and passing into functions
[Re: ]
#450988 04/26/1514:5004/26/1514:50