• 0

exile event handlers


Let me preface this, the reason I am asking about these is for an add on that is WIP for exile, I hope that it will add an entirely new aspect to exile. It is about 50% done for the initial version, and I've found myself stumped on the best way to proceed with eventhandlers. What I need is to temporarily disable most/all exile eventhandlers, replace them with my own (so as to not disturb the exile db, or have people respawning as bambis), and then eventually disable my own and re-enable exile's eventhandlers.


I would like to know more about exiles event handlers for damage, killed, ect.

I've looked through exile and come across similar to:

_unit removeAllEventhandlers 'HandleDamage';
is this all I need to turn off the default handlers, or are there more handlers that I just haven't seen?


also, if I'm correct, this will re-enable exiles damage handler?

_unit addEventhandler ['HandleDamage', {true}];



I've also slightly modified exileclient_object_player_event_onkilled.sqf to accommodate what I'm doing, however I don't see any code in there that adds the players death to the database, I can go looking for that on my own, unless one of you knows where it is off the top of your head.


I guess I'm not really sure which one of you dev's is in charge of the this part of the code, so if I could get a private conversation with whomever that may be, it would be much appreciated. (I will try to keep it short and to the point, but I don't want to elaborate further on what I'm doing publicly)

Share this post

Link to post
Share on other sites

1 answer to this question

  • 1

We use the event handlers of Arma the way Arma wants us to use it. If you want to disable them, then you will have to restore them. For players, look at ExileClient_object_player_event_hook.

// Triggered when the unit is killed. 
player addEventHandler ["Killed", { _this call ExileClient_object_player_event_onKilled}];


// Triggers when a unit shoots
player addEventHandler ["Fired", { _this call ExileClient_object_player_event_onFired}];

// Triggered when our unit shoots or a unit next to it
player addEventHandler ["FiredNear", { _this call ExileClient_object_player_event_onFiredNear}];

// Triggered when our player is hit by an explosion
player addEventHandler ["Explosion", { _this call ExileClient_object_player_event_onExplosion}];

// Triggered when our player damaged
player addEventHandler ["HandleDamage", { _this call ExileClient_object_player_event_onHandleDamage}];

// Triggers when a unit puts an item in a container. 
player addEventHandler ["Put", { _this call ExileClient_object_player_event_onPut}];

// Triggers when a unit takes an item from a container. 
player addEventHandler ["Take", { _this call ExileClient_object_player_event_onTake}];

// Triggered when a unit closes inventory. 
player addEventHandler ["InventoryOpened", { _this call ExileClient_object_player_event_onInventoryOpened}];

// Triggered when a unit closes inventory. 
player addEventHandler ["InventoryClosed", { _this call ExileClient_object_player_event_onInventoryClosed}];

Not sure if that answers your question, since I don't really understand it :( 

Share this post

Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.