Skip to content

CBA_fnc_globalEventJIP#314

Merged
Killswitch00 merged 3 commits intomasterfrom
globalEventJIP
Apr 24, 2016
Merged

CBA_fnc_globalEventJIP#314
Killswitch00 merged 3 commits intomasterfrom
globalEventJIP

Conversation

@commy2
Copy link
Copy Markdown
Contributor

@commy2 commy2 commented Apr 24, 2016

This adds CBA_fnc_globalEventJIP to the CBA events frame work.

It is basically the same as CBA_fnc_globalEvent, but all event calls (with their passed arguments) that happen during a mission are stored globally on a game logic. They are automatically called on clients that join in progress.

This is usefull for local commands that are not JIP persistent (e.g. setIdentity, setFace, setRank, etc. etc.)

The _jipId variable is an optional parameter that can be used to overwrite previous events with a new one. If no id is provided one will be automatically generated. This follows the same logic as the JIP ID in the remoteExec SQF command. (https://community.bistudio.com/wiki/remoteExec)

(While it uses clientOwner, which I consider to be broken in save games, this actually doesn't matter as the wrong owner IDs returned by it are still unique)

["print_test", {
    diag_log text str _this;
    _this spawn {
        sleep 5; // the chat is cleared after the loading screen in A3, so delay the message a bit
        systemChat str _this;
    };
}] call CBA_fnc_addEventHandler;

systemChat str (["print_test", "TEST_TEST_TEST"] call CBA_fnc_globalEventJIP)

@commy2 commy2 added the Feature label Apr 24, 2016
@Killswitch00 Killswitch00 merged commit 099cfc3 into master Apr 24, 2016
@thojkooi
Copy link
Copy Markdown
Contributor

Can a globalEventJIP be removed from the queue?

@commy2
Copy link
Copy Markdown
Contributor Author

commy2 commented Apr 25, 2016

No. At least not with API.

@thojkooi thojkooi deleted the globalEventJIP branch April 25, 2016 11:32
@PabstMirror PabstMirror mentioned this pull request Apr 26, 2016
@commy2 commy2 added this to the 2.3.2 milestone May 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants