ov3rlord 0 Posted September 23, 2008 Hi all, got a question for anyone that knows a bit about scripting. I'm in the middle of creating a co-op SF mission where your first objective is to destroy a series of anti-air defences in order to allow an imaginary ac130 to provide CAS. I have a working script for the gunships fire mission but am having trouble working out how to get the radio trigger it's linked to become visible only after the anti-air units are destroyed. At the moment I have a trigger, linked to my squad, set up with the following settings; activation:any group member, repeatedly, type:none, condition:!(alive antiair) onactivation:1 setRadioMsg "25mm GAU-12 Gatling gun";[] exec "artillery\setfire.sqs" As it is, the radio message is not accessable and the script automatically activates after i destroy the enemy unit.any ideas? Share this post Link to post Share on other sites
=Odin= 0 Posted September 23, 2008 G'day, put somthing like this in the condition. <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">(not alive a1) and (not alive a2) and (not alive a3) and (not alive a4); a1 --> to a4 representing the names of your AAA, just add or subtract to suit the amount of units that need to be dead befor trigger kicks Odin Share this post Link to post Share on other sites
ov3rlord 0 Posted September 23, 2008 Cheers for the reply Odin, but I don't think I explained the problem very clearly before as I was in a rush to go out. I've sorted out my initial difficulty now anyway, I was being an idiot and had the trigger linked to my group rather than activated by radio alpha.What I'm currently stuck on however, is how to hide the radio option in the menu until after the destruction of the AA units. Any ideas on how to do this? Cheers. Share this post Link to post Share on other sites
=Odin= 0 Posted September 25, 2008 Heya, sorry for the slow response busy week at work( I hates laying floorboards ) Anyhoo to answer your question, The way you are trying to do it with the setRadioMsg is probably not going to work the way you are wanting it to, because as soon as it is activated it is going to give the message you want..... but also will execute the script. So to get it to work as you are asking we need to create the radio trigger on the fly. 1st create this trigger ; activation- none ; type- switch ; name- radioAlpha ; condition-this ; onAct- 2nd create this trigger ; activation- none ; type- none ; name- ; condition- (not alive a1) and (not alive a2) and (not alive a3) and (not alive a4) ; onAct- PAPABEAR=[West,"HQ"]; PAPABEAR SideChat "Gunship now in range"; this = execVM "RadioTrigger.sqf" This is the script that will creat our radio trigger and luanch the script. RadioTrigger.sqf <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">if (local player) then { radioAlpha = createTrigger["EmptyDetector",getPos player]; radioAlpha setTriggerArea[0,0,0,false]; radioAlpha setTriggerText "25mm GAU-12 Gatling gun"; radioAlpha setTriggerActivation["ALPHA","PRESENT",true]; radioAlpha setTriggerStatements["this", "[] exec ""artillery\setfire.sqs""", ""]; sleep 1; }; I hope this helps Share this post Link to post Share on other sites
ov3rlord 0 Posted September 25, 2008 Odin, you're an effin diamond mate! Thanks a lot for that it works perfectly. I'm a bit of a noob when it comes to scripts and the like so I'm having to rely on the kindness of people like yourself at the moment. Now I can get on and finish my mission. Cheers man! Share this post Link to post Share on other sites
=Odin= 0 Posted September 26, 2008 Anytime mate, I have only been doing scripting about a year now and still consider myself a noob, so much to learn/ and forget the forums are a great place to start. btw If you are calling SQF via the RadioTrigger script, replace the setTriggerStatements line with this, <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">radioAlpha setTriggerStatements["this", "execVM ""artillery\setfire.sqf""", ""]; GL Odin Share this post Link to post Share on other sites