Skip to content
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

Merged
merged 3 commits into from
Sep 3, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions addons/events/fnc_removeGlobalEventJIP.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Copy link
Contributor

@Dystopian Dystopian Aug 29, 2017

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


Returns:
Nothing
Expand All @@ -17,9 +17,9 @@ Author:
#include "script_component.hpp"
SCRIPT(removeGlobalEventJIP);

params [["_jipID", "", [""]], ["_object", nil, [nil, objNull]]];
params [["_jipID", "", [""]], ["_object", objNull, [objNull]]];

if ((isNil "_object") || {isNull _object}) then {
if (isNull _object) then {
GVAR(eventNamespaceJIP) setVariable [_jipID, nil, true];
} else {
[_object, "Deleted", {
Expand Down