Forum Jump :

Author Message

Posts: 1

Level: Member

Country: uk
In-game name: Streblo88

#1 Posted at 2013-02-19 13:07        
Hello, I rarely post in forums asking for help but my latest project in the editor has me completely stumped. I have an air support script that I have used many times before, but this time I only want it to work if my unit is wearing one of ACE's PRC-119 radio packs.

I would normally start the script either in a units init or the mission init like so -

player addAction ["Request Support","Support.sqf"];

Are there any geniuses out there who could help me add a condition to this addAction to check that the player is wearing an ACE PRC-119 pack? (classname ACE_PRC119 if it helps)

I have been googling this for days and have found some info, but unfortunately nothing has worked. I have had some success by placing a UAV pack in the editor and adding the addAction strait into the UAV pack's init. This is not ideal though as you have to drop the bag on the floor in order to access the actions, as well as this you cannot pack items into the UAV bag, so its just too inconvenient.

If anyone has a solution to this please share it as this is driving me mental. Thanks in advance!

Just a quick thourght, it does not have to be that exact backpack by the way, any would do. My thinking was if the addAction command was in the players unit's init and you meet the condition of having said backpack, you would be able to access the actions without having to drop your backpack like with the UAV pack.

Added 3 hours 16 minutes later:

Its OK I found a solution thanks to panther42 over at BI forums.

this addAction ["Request Support","support.sqf", [], 6, true, true, "", """ACE_PRC119"" in weapons _this"];

If anyone wondered.

This post was edited by Streblo88 (2013-02-19 17:36, ago)

Ballistic nappy anyone?