colubridae Posted April 5, 2019 Share Posted April 5, 2019 I have an ‘interesting’ problem. I’ve constructed a three stage mission F-18 flies off carrier attacks multiple helicopter targets (copied from F-15 mission) Returns to carrier re-arms refuels takes off attacks armoured column with mavs and MK82s Returns to carrier rearms refuels – takes off attacks in coming flight of Tu23Ms My problem is I don’t want to activate the backfires until after the second re-arm/refuel. I can’t see how to set the flags and conditions to achieve this. (I can set simple flags and conditions) Please help. Any advice welcome. (i tried taxiing on the carrier to a trigger zone but the zone doesn’t move with the carrier) Link to comment Share on other sites More sharing options...
deafaviator Posted April 5, 2019 Share Posted April 5, 2019 I have an ‘interesting’ problem. I’ve constructed a three stage mission F-18 flies off carrier attacks multiple helicopter targets (copied from F-15 mission) Returns to carrier re-arms refuels takes off attacks armoured column with mavs and MK82s Returns to carrier rearms refuels – takes off attacks in coming flight of Tu23Ms My problem is I don’t want to activate the backfires until after the second re-arm/refuel. I can’t see how to set the flags and conditions to achieve this. (I can set simple flags and conditions) Please help. Any advice welcome. (i tried taxiing on the carrier to a trigger zone but the zone doesn’t move with the carrier) To get zones to move with the carrier you need to set a condition for something like “Unit inside moving zone” Here’s what I would do: Set up a zone big enough to encompass the carrier. Don’t need to bother putting it on the carrier as it will get linked to the carrier when you set the condition up for it. Use Switched trigger. Set Unit inside moving zone condition, use your unit, and the zone linked to the carrier. Set the trigger for this to be Flag 1 = 1 Set up all your enemy units and set them for Late Activation. Set triggers for each one: Heli units activate when Flag 1 = 1. Armored column units activate when Flag 1 = 2. TU23’s activate when Flag 1 =3. When you start the mission your Flag 1 will = 1, and the heli units will activate. Fly out and do your thing. When you come back to the carrier, the trigger will put another digit onto Flag 1, making it have a value of 2. This will trigger the column. Fly out and kill them. Then when you come back, now your flag 1 will have a value of 3. TU23’s will activate. Hope this helps. I’ll make a video for ya later if you need it. Todd “Dipstick” Barker Link to comment Share on other sites More sharing options...
colubridae Posted April 6, 2019 Author Share Posted April 6, 2019 thanksfor advice Todd I hope you don't mind but I'd be grateful if you could look at my mission. it's a cut down version of the original so that I can test the trigger logic, but it doesn't do what I expected the triggers to do. Flag 1 is set to 1 by mission start - ok Flag 1 is increased to 2 by a simple 10 sec timer. - ok Flag 1 should then be increased by 1 when my aircraft (doubtfire)enters the moving trigger zone (launch zone) attached to the aircraft(stennis). But this does not seem to happen. The switched trigger occurs as if the trigger zone is stationary and not attached to the stennis. For simplicity i’ve left out the action to activate the bombers and I've included messages to trace the state of flag 1. (I’ve tried this with the stennis stationary and the trigger zone as non-moving and it works perfectly.) Link to comment Share on other sites More sharing options...
deafaviator Posted April 6, 2019 Share Posted April 6, 2019 I’ll take a look when I get a chance. Todd “Dipstick” Barker Link to comment Share on other sites More sharing options...
colubridae Posted April 7, 2019 Author Share Posted April 7, 2019 Thanks Todd. I think I may have cracked it. As far as I can see, the trigger zone must be as large as the carrier. I also found that to avoid counting wave offs and Boulters, I needed to trigger low speed off the aircraft combined with entering the trigger zone. Thanks for your help and advice. Sent from my SM-A310F using Tapatalk Link to comment Share on other sites More sharing options...
deafaviator Posted April 7, 2019 Share Posted April 7, 2019 Sorry I’m a truck driver and don’t always have internet access and I’m stuck this weekend without access. Yes that’s what I do for my LSO “in the groove” calls: switched condition, Unit is below 190 knots and below 500’ agl and within a zone of the carrier which is about 7000’ radius I believe. Todd “Dipstick” Barker Link to comment Share on other sites More sharing options...
colubridae Posted April 7, 2019 Author Share Posted April 7, 2019 (edited) Thanks Todd. you put me on the right track. :thumbup: It's working how I want now. Edited April 7, 2019 by colubridae addition Link to comment Share on other sites More sharing options...
Zayets Posted April 8, 2019 Share Posted April 8, 2019 Mate, your problem couldn't be more simpler to solve. Say that your Backfires flight will be activated if flag 777 is on, right? The what you will have to do is simple: open the waypoint where the F18 flight is coming the second time for refuel and rearm. Then click Advanced Waypoint Actions. Click Add. Then from the Chose Perform Command for Type. Chose Run Script for Action. In the text box type this : trigger.action.setUserFlag('777', true) Now, when the flight reaches that waypoint Backfires will be activated provided you have one trigger in ME saying GroupActivate [backfires Group, of course] if flag 777 is on. Good luck and have fun. [sIGPIC]OK[/sIGPIC] Link to comment Share on other sites More sharing options...
colubridae Posted April 8, 2019 Author Share Posted April 8, 2019 Thanks for the advice Zayets. I’m definitely interested in your scripting option, but I’ve never used it so I’d best look up some tutorials. The problem is that I don’t want to release the bombers until I’ve landed a second time on the carrier and refuelled/rearmed. The best I’ve managed (without scripting) is to count successful carrier landings (ie without counting wave-offs/boulters) :):thumbup: Link to comment Share on other sites More sharing options...
Zayets Posted April 8, 2019 Share Posted April 8, 2019 The bold text is the only script you would write. You don't have to read anything unless, of course, you would want to get good with scripting. [sIGPIC]OK[/sIGPIC] Link to comment Share on other sites More sharing options...
deafaviator Posted April 8, 2019 Share Posted April 8, 2019 Wouldn’t you just be able to set that in the ME itself? Doesn’t seem like it needs to be a manual script. Todd “Dipstick” Barker Link to comment Share on other sites More sharing options...
Zayets Posted April 8, 2019 Share Posted April 8, 2019 All of what I said is to be done in ME. [sIGPIC]OK[/sIGPIC] Link to comment Share on other sites More sharing options...
colubridae Posted April 8, 2019 Author Share Posted April 8, 2019 Mate, your problem couldn't be more simpler to solve. Say that your Backfires flight will be activated if flag 777 is on, right? The what you will have to do is simple: open the waypoint where the F18 flight is coming the second time for refuel and rearm. Then click Advanced Waypoint Actions. Click Add. Then from the Chose Perform Command for Type. Chose Run Script for Action. In the text box type this : trigger.action.setUserFlag('777', true) Now, when the flight reaches that waypoint Backfires will be activated provided you have one trigger in ME saying GroupActivate [backfires Group, of course] if flag 777 is on. Good luck and have fun. I know this sounds dumb but.. Is this ‘trigger.action.setUserFlag('777',true)’ a piece of LUA code? (I'm not sure if 'scripting' is the same as 'LUAing') If so, then is there a list of the other objects used by DCS? :) Link to comment Share on other sites More sharing options...
Zayets Posted April 8, 2019 Share Posted April 8, 2019 Yep, that's a piece of lua code. You copy it and paste as per my post. Create a trigger in which if flag 777 is on then Tu's are activated. I am not entirely sure what you mean by other objects though. [sIGPIC]OK[/sIGPIC] Link to comment Share on other sites More sharing options...
colubridae Posted April 8, 2019 Author Share Posted April 8, 2019 Yep, that's a piece of lua code. You copy it and paste as per my post. Create a trigger in which if flag 777 is on then Tu's are activated. I am not entirely sure what you mean by other objects though. ok think i'm on the case a bit more i've now found the intro to dcs lua coding and i'm working my way thru it from scratch. :thumbup: Link to comment Share on other sites More sharing options...
Zayets Posted April 8, 2019 Share Posted April 8, 2019 Mate, you really don't need the intro to lua coding (unless you learn it to do scripting in future) to achieve what you want with my instructions. But hey, to each his/her own. Good luck. [sIGPIC]OK[/sIGPIC] Link to comment Share on other sites More sharing options...
Recommended Posts