TheHighwayman Posted August 28, 2016 Posted August 28, 2016 (edited) Hello, I can work with triggers and flags, but my experience is still limited. First item: I am looking to set a trigger for the following scenario; Plane A intercepts Plane B by entering the B moving trigger zone (flying close). Plane B does immediate RTB. I'm not sure what triggers to use to make this happen, if any. Bonus points if I can set a flag to delay the RTB maneuver for a minute or so. Second item: Plane C fires a weapon and it triggers a message. I know how to set the message to play. But is there a way to make a message trigger when a weapon is fired? Thanks! Edited August 28, 2016 by TheHighwayman typo
ESAc_matador Posted August 28, 2016 Posted August 28, 2016 Interesting. I mess a little bit around, but not deep enough. I wanted to make a script where a group RTB when they where in minority...
rge75 Posted August 28, 2016 Posted August 28, 2016 If I understood it correctly, then you can simply set a new flag when Plane enters the moving trigger zone of B. Then, you do 2nd trigger "time since flag (60)" (I suppose that's how it's called in the english version). To make it return to base, you can use the set waypoint for the AI. Simply set it to the last waypoint. I'm not quite sure if it's a default trigger or if you have to create a "triggered action" for the plane (3rd ribbon when you selected a plane). 1 My DCS videos https://www.youtube.com/channel/UCJX2av4UE4xqWto3y8EZWMw [sIGPIC][/sIGPIC]
TheHighwayman Posted August 28, 2016 Author Posted August 28, 2016 Okay, I managed to set a flag for the unit, which starts a timer, after which he will bug out. BUT, how do I make him bug out and fly home?
TheHighwayman Posted August 28, 2016 Author Posted August 28, 2016 It happens the plane I want to bug out is unarmed. I even took the bullets out of the gun. What happens if... Advanced Waypoint Options I set RTB on out of ammo, Is User Flag 2 User Flag 2 = Pilot 1 enters moving zone around Pilot 2. I will test this, because if it works, I can manipulate it to get Pilot 2 to go home when I want. Another possibility is to set a waypoint to check for winchester and RTB which is after a reasonable period has elapsed for the player to perform the intercept. It would have the effect of tailing the plane for awhile, then he bugs out, the only problem it would be at the same waypoint, and not when you approach. Thoughts?
Wrecking Crew Posted August 28, 2016 Posted August 28, 2016 Set up a Triggered Action for Plane A to Perform Command -> Change Waypoint to the airbase waypoint. (and cross your fingers it works :) ) One thing about flags that can get toggled or retriggered every second... using a Time Since Flag may not work because the flag may go Off/False before the time runs down, or if the flag is going On/True every second (this happens with unit_in_zone type Mist functions) then again the flag will not be On/True long enough to reach the time limit. To counter this I use a 'latch' flag that I turn to true when the first flag is detected as true. Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
TheHighwayman Posted August 28, 2016 Author Posted August 28, 2016 Advanced Waypoint Options I set RTB on out of ammo, Is User Flag 2 User Flag 2 = Pilot 1 enters moving zone around Pilot 2. It didn't work. But I need to play with it, I could be missing something. Any help is still appreciated! Wrecking Crew, I will try your idea.
rge75 Posted August 28, 2016 Posted August 28, 2016 I attached an example miz and a screenshot. HTH ;) As you'll notice, the leader will NOT go to WP2. He'll switch to WP3 once the follower is within the moveable trigger zone.AI_BailOut_Example.miz My DCS videos https://www.youtube.com/channel/UCJX2av4UE4xqWto3y8EZWMw [sIGPIC][/sIGPIC]
TheHighwayman Posted August 28, 2016 Author Posted August 28, 2016 Wrecking Crew, I don't see any of those options under Triggers > Actions Menu I'm missing something...
rge75 Posted August 28, 2016 Posted August 28, 2016 See my scrernshot. You have to create a "triggered task" on the unit. My DCS videos https://www.youtube.com/channel/UCJX2av4UE4xqWto3y8EZWMw [sIGPIC][/sIGPIC]
TheHighwayman Posted August 28, 2016 Author Posted August 28, 2016 Like this? But now I am unsure how to trigger it. As I have it, I think the plane would RTB when it reaches Waypoint 1?
TheHighwayman Posted August 28, 2016 Author Posted August 28, 2016 Like this? But how do I trigger the action? As I have it now, I think the plane will RTB when it reaches Waypoint 1? https://postimg.org/image/8kkm1z2jt/
rge75 Posted August 28, 2016 Posted August 28, 2016 Exactly like this. No, those triggered actions are not bound to a waypoint. Now use the "normal" triggers. If you're unsure, check out the miz file I attached some posts earlier. I don't know how it's called in the english ME. But the trigger will be something like "do triggered action". You'll then be able to chose the action there. My DCS videos https://www.youtube.com/channel/UCJX2av4UE4xqWto3y8EZWMw [sIGPIC][/sIGPIC]
TheHighwayman Posted August 28, 2016 Author Posted August 28, 2016 I got it! Thanks. I opened the example you sent and duplicated that. Now let's see if it works!
Wrecking Crew Posted August 28, 2016 Posted August 28, 2016 Sorry, I had to work on my septic system :-P You can set a flag at a waypoint, too. --- set a flag at a waypoint 'Perform Command', Run Script trigger.action.setUserFlag(71007, 1) 1 Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
TheHighwayman Posted August 28, 2016 Author Posted August 28, 2016 Thank you all. I believe I have it working now. The offending plane is on his way home! I hope you will all soon be able to enjoy the missions I am building.
TheHighwayman Posted August 28, 2016 Author Posted August 28, 2016 (edited) THANK YOU Thank you for your help. I'd like you to enjoy a sneak preview of the mission I built using what I learned from you. It is part of a campaign I am building. Enjoy the attached mission. Feedback is appreciated. It requires the MiG 21bis, and plays on 1.5.O4F_2_Not again.miz Edited August 28, 2016 by TheHighwayman
Wrecking Crew Posted September 1, 2016 Posted September 1, 2016 Your logic is working. I'd align your group, pilot and zone names, like 'Escort' and 'Recon'. My advice is to send all of messages to ALL. If you need to, address the message in the text. Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
TheHighwayman Posted September 1, 2016 Author Posted September 1, 2016 Thank you, that's good feedback.
Wrecking Crew Posted September 2, 2016 Posted September 2, 2016 Man, I was working on this last night for you, when I changed all your messages to All, and all the message content disappeared! I'll look at your new mission this weekend,,, 3 day w/e yeah! https://forums.eagle.ru/showthread.php?p=2890716#post2890716 Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
TheHighwayman Posted September 2, 2016 Author Posted September 2, 2016 Well that's unfortunate. The good news is it can be fixed. As I get closer to completing the campaign, I will review and probably rewrite some of the messages and add more. I hope to tell a story through the course of the campaign. Your help is appreciated! Have a peek at this one next. I can't beat it. LOL https://forums.eagle.ru/showthread.php?t=173319
Recommended Posts