-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add removeGlobalEventJIP #741
Conversation
-_- |
|
||
params [["_jipID", "", [""]], ["_object", nil, [nil, objNull]]]; | ||
|
||
if ((isNil "_object") || {isNull _object}) then { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
params [["_jipID", "", [""]], ["_object", objNull, [objNull]]];
if (isNull _object) then {
call looks strange (to me):
I mean we add the event and then remove it. Maybe function name should differ, e.g. |
@@ -6,7 +6,7 @@ Description: | |||
|
|||
Parameters: | |||
_jipID - A unique ID from CBA_fnc_globalEventJIP. <STRING> | |||
_object - Object, will remove jip EH when object is deleted. Or pass nil to ignore and remove immediately [optional] <OBJECT>or<NIL> | |||
_object - Will remove jip EH when object is deleted or immediately if object is null [optional] <OBJECT> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or immediately if object is null
or immediately if omitted
execVM "\x\cba\addons\events\test_globalEventJIP.sqf"
|
Idea is from something @Dystopian did in acemod/ACE3#5418
Adds a way to remove things from the globalEventJip queue.
Either immedietly or if passed an object it will remove the jipEvent if object is deleted.
remoteExec
has something similar and it can be set to not run on jips if object is deleted.Doesn't cause problems, but one issue is that
setVar [x, nil]
does not remove fromallVariables
But it still stops the event from running.