Jump to content
Moon_chilD

Zeus Access through ACE Interaction

Recommended Posts

Hey guys,

for week am I trying to get my idea to work but I'm at a point were I don't know anymore. This might sound a bit complicated so I will take my time to explain it:

What I want is an ACE Self-Interaction entry that grants me Zeus access whenever I want. This is bound to some conditions though. 
I want to declare in the mission (via Unit synced to a module) who gets access to this Self-Interaction entry. I also want to have a whitelist of people that will always have this Self-Interaction entry. When the Zeus access was granted I want to  have the option to remove the access to Zeus again. (This though should not be an issue once I have the adding ready)
 

Over all I get it to work, the issue is the initialization of the code. Currently the idea is that the self-interaction is given to all units via "Extended_Init_Eventhandlers" for "CAManBase". That so far works. The issue is now that my code to add the self interaction is bound to several conditions:
Here is the function that gets execute by the Eventhandler: https://github.com/IndeedPete/staf-mods/blob/master/Source/%40STAF_Misc/addons/staf_framework/fnc/zeusaction/fn_zeusactioninit.sqf
This adds the three ACE Self-Interaction Entries: The Subaction where the other actions are settled in and the two action to "Promote" and "Demote" (Giving and taking Access) 

These two Entries are the following:
Promotion: https://github.com/IndeedPete/staf-mods/blob/master/Source/%40STAF_Misc/addons/staf_framework/fnc/zeusaction/fn_zeusactionpromotion.sqf

Demotion: https://github.com/IndeedPete/staf-mods/blob/master/Source/%40STAF_Misc/addons/staf_framework/fnc/zeusaction/fn_zeusactiondemotion.sqf

As you can see there are two variables that need to be set correctly in order for the unit/player to get the appropriate action:
STAF_var_ZeusAction: If true then the demotion action is shown if false the promotion action is shown

STAF_var_ZeusActionEligible: If true, the actions are show if false they are not shown.

All my module that I sync to the unit does is Setting the Variable "STAF_var_ZeusActionEligible" to true. Now here is my biggest issue right now. This only works on mission start, but I want it to work with JIP people aswell. (e.g. the Players connect to the server already and the Zeus joins in later and therefore is not set to eligible). So basically the only thing I need is a way to set these variables automatically with the module even for jip people. I feel like there is a very easy solution to this. I just don't find it. 

I know you might think this is totally useless, just assign a Zeus during the mission creation and bam. There are reasons behind this like "Having access to Zeus in any mission when this mod is loaded". 

Thank you very much for helping. I know this text might be confusing so I'm open to answer you questions!
One more thing, I know my code might be ugly or not the most efficient or even 100% correct. I'm very open to criticism since I'm still in a learning process.

Many Greetings
Moony

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×