Jump to content
chrisbaker1981

Activate Trigger with Specific Helmit or Uniform

Recommended Posts

Any ideas on some simple code in the triggers conditions field that checks if a player in my case named "dude" has a specific helmit or uniform on? or both..

 

Ive got the code to change your side to CSAT, but i want the condition if you are wearing the enemy uniform and helmit of my choice.

 

I have code for checking for a specific inventory item in player, but cant seem to figure out how to adapt to check for uniform or and helmit.

 

Code i have for checking for inventory item, in this example checks for a map in player dudes inventory     "ItemMap" in (items dude + assignedItems dude)

 

I tried changing itemMap to Headgear_the full name of my helmit but that doesnt work.. I suppose because the +assignedItems part is still trying to assign an item. I want to assign a headgear, and another one for uniform.

 

Any ideas? 🙂

Share this post


Link to post
Share on other sites

Place the specific helmet on a table.

Give the helmet a name.

The player starts the mission by walking up to the table and putting on that helmet.

Create a trigger that will only fire when the helmet is present.

I have not tested this.

-----------------------

To test this theory give a truck a name. Drive the truck into the trigger and see if the trigger fires.

.

 

 

 

 

Share this post


Link to post
Share on other sites

Easy: https://community.bistudio.com/wiki/headgear and https://community.bistudio.com/wiki/uniform

 

The headgear or uniform is just a string, and probably the easiest was to get it is to go into the loadout editor, put the helmet/uniform on unit and copy it to clipboard. It'll give you the string for those items. 

 

So:

((headgear player == _enemyHeadgear) || (uniform player == _enemyUniform))

 

Where the _enemy variables are the strings of those items. That'll trigger if you are wearing the helmet or uniform. 

 

Sorry if there's any confusion, I've written this from my phone. 

  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, beno_83au said:

Easy: https://community.bistudio.com/wiki/headgear and https://community.bistudio.com/wiki/uniform

 

The headgear or uniform is just a string, and probably the easiest was to get it is to go into the loadout editor, put the helmet/uniform on unit and copy it to clipboard. It'll give you the string for those items. 

 

So:

((headgear player == _enemyHeadgear) || (uniform player == _enemyUniform))

 

Where the _enemy variables are the strings of those items. That'll trigger if you are wearing the helmet or uniform. 

 

Sorry if there's any confusion, I've written this from my phone. 

 

mmm i cant seem to get it right.

 

do i replace _enemyHeadgear with the full string of the helmet?

 

which in my case would be Headgear_H_Helmet0_ViperSP_ghex_F

 

Ill mess about more with it after work..

Share this post


Link to post
Share on other sites
2 hours ago, chrisbaker1981 said:

do i replace _enemyHeadgear

Yes, but a string is surrounded by " ":

 

"Headgear_H_Helmet0_ViperSP_ghex_F"

 

edit: Not on my PC at the moment, but from looking at one of the online config references the classname you're looking for might be:

"H_HelmetO_ViperSP_ghex_F"

Share this post


Link to post
Share on other sites

Oh Dear, i forgot you cant put enemy uniforms on from dead players, how annoying..

 

Any way round that?

Share this post


Link to post
Share on other sites
1 hour ago, pierremgi said:

or the MGI advanced module

 

The Legend has spoken!

 

Thanks MGI.. When are you going to make Arma4 for us?

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

×