Jump to content
Sign in to follow this  
SGT Fuller

Avoiding AGM dependency and Helmet visor

Recommended Posts

Hey guys i have two questions. First how would i go about having AGM lines in my config but avoid it being a dependency? basically is there a way for it to check for AGM and if it isnt there then it doesnt worry about it so you wont get a error saying AGM is needed.

2nd Question: I have a helmet that i want to give an option to lift the visor up and down..how would i go about this?

Thanks in advance.

Share this post


Link to post
Share on other sites

Two ways that I'm thinking:

First is to check if they have a specific addon from AGM enabled via this:

https://community.bistudio.com/wiki/activatedAddons

Second, and I think it will work (not 100% sure though), is to check to see if certain classes are nil or not i.e.:

if (!isNil "Some_AGM_Classname") then {...};

Share this post


Link to post
Share on other sites

AGM_Present = if ("agm_core" IN activatedAddons) then {true} else {false};

Share this post


Link to post
Share on other sites
Hey guys i have two questions. First how would i go about having AGM lines in my config but avoid it being a dependency? basically is there a way for it to check for AGM and if it isnt there then it doesnt worry about it so you wont get a error saying AGM is needed.

If you are inserting AGM properties in config, for example

AGM_FastRoping = 0;
AGM_FastRoping_Positions[] = {};

for a helicopter or similar, you can do so freely without any dependencies. Any extra config properties you add which are not used by the game itself are ignored by the game. You can have a "fullerpj_thing = 123" and the game will not care, unless you actually read it and do something with the values.

Share this post


Link to post
Share on other sites
AGM_Present = if ("agm_core" IN activatedAddons) then {true} else {false};

What is the if/Else for? the "in" already returns bool so (unless there's some arma weirdness here) the following would be equivalent:

AGM_Present = ("agm_core" in activatedAddons);

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
Sign in to follow this  

×