Captain Orso Posted October 27, 2019 Posted October 27, 2019 This is only in regards to a SinglePlayer mission. I know how I can trigger 'Active Pause' at mission start. I have a mission I use for training and testing, with a number of aircraft from which to choose doing airstarts. I'd like to setup a trigger(s) that when selecting an aircraft and entering the cockpit (clicking "FLY") the aircraft automatically goes into 'Active Pause' whether it's the first time I'm entering the cockpit or the 10th, whether it's the first aircraft I'm entering or the 5th. Does anyone know how to do this? When you hit the wrong button on take-off System Specs. Spoiler System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27" CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
FSFIan Posted October 27, 2019 Posted October 27, 2019 You can use the "X: SET COMMAND" trigger to trigger command 816. That will enable Active Pause. I don't know much about ME trigger conditions, so I don't know how you would find out when the player enters the cockpit (probably trigger on the unit being activated or something?), but one of the ME experts here can probably help you with that. DCS-BIOS | How to export CMSP, RWR, etc. through MonitorSetup.lua
Captain Orso Posted October 27, 2019 Author Posted October 27, 2019 Thanks for the reply Ian. Yes, I already knew how to use X: SET COMMAND (816). What I'm really looking for is the condition --you/your aircraft just spawned into the world just now--, so that I can set 'active Pause'. What I really-Really want to do is have an Harrier airstart startin with Automatch Flight Controls -- AFC -- (~autopilot) turned on, so that it doesn't immediately start to take a nose-dive. When you hit the wrong button on take-off System Specs. Spoiler System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27" CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
Rudel_chw Posted October 28, 2019 Posted October 28, 2019 ... What I'm really looking for is the condition --you/your aircraft just spawned into the world just now--, so that I can set 'active Pause'. On my missions I use the condition UNIT ALIVE to detect which aircraft is being flown by the player at the moment, that allows me to provide the player with a Cold Start aircraft or an Air started aircraft. On this trigger, I detect if the player has selected the Slot with the Cold Start aircraft: It is a switched condition, to cater for when the player first select one plane and then changes its mind and selects the other one and so on .. the switched condition allows me to detect all these changes. I've a Flag assigned to each aircraft, so I can detect if the player was already alive on this aircraft or if it is the first second that he's been here .. for the Cold Start aircraft its Flag 102: True if the player is already on that aircraft, false if not. For the Air Start aircraft the Flag is 101. The above trigger works when the player changes Slot mid-mission .. to catch the case when the player select the aircraft prior to mission start, I use this other very similar trigger: The lot of Flags on the Action column are basically reseting the player status on the mission, but could be any other action that you want. 1 For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar Mobile: iPad Pro 12.9" of 256 GB
Captain Orso Posted October 28, 2019 Author Posted October 28, 2019 Thanks for the reply Rudel, I couldn't really follow your explanation very well. I've figured out how to use 'SWITCHED CONDITION' to work to some extent, but 'SWITCHED CONDITION' is such a sh*t-show of logic, that it's nearly impossible to use in my case. It works exactly as described in the manual, and that's the problem: "The trigger will perform the set action(s) every time the trigger's condition is checked and evaluated as true and its previous state was false". This means, the first time the trigger is evaluated, the results will ALWAYS be 'false' even if the condition is 'true', bc the trigger is so dumb that it MUST have a previous value from a previous evaluation with which it can compare, instead of the simple logic that the first comparison is ALWAYS false, bc it logically can never be true. This is what is forcing you to use special flags etc -- at least as I understand your triggers -- to keep track of what the previous stati were. It could however be so simple :mad: When you hit the wrong button on take-off System Specs. Spoiler System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27" CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
Rudel_chw Posted October 28, 2019 Posted October 28, 2019 ... I couldn't really follow your explanation very well... Sorry, I'm not a native english speaker, so I have sometimes a hard time trying to convey my meanings. I showed this particular example because It was the closest to your case .. I needed a way to determine which aircraft is the player using, and for me that way was the UNIT ALIVE condition. If the mission has several aircrafts set as "Client", and the mission is for Single Player use, the UNIT ALIVE will be true only for the unit currently being flown by the player. On my mission, I wanted to do some tasks whenever the player selected a Client aircraft, a ONCE trigger would only work the first time that the player selects the Client .. that's why I cloned the ONCE trigger to create the SWITCHED CONDITION copy .. one handles the first time the user enters the Client, the other takes over from that point, so that the player may change slots multiple times but the trigger logic still stands. The triggers get evaluated once per second, so I use a Flag to ensure that the triggers gets executed only the first time the user switches planes. Eduardo. For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar Mobile: iPad Pro 12.9" of 256 GB
Captain Orso Posted October 28, 2019 Author Posted October 28, 2019 Hi Edwardo, Okay, then I did understand everything, or at least I discovered what I didn't understand. So my triggers work just like yours. The problem I'm still having is that I also sometimes jump into the mission initially as an observer, or game master. What happens then, is the 'SWITCHED CONDITION' triggers are evaluated and the comparison value for 'Unit Alive' is set to an empty value like space, or a string with zero length (typically the way script engines do this). At any rate, not like in my previous post the very first time the trigger is evaluated. Then when you enter an aircraft the 'ONCE' trigger is true, because it's the first time this aircraft was entered, PLUS when the 'SWITCHED CONDITION' trigger is evaluated, and since you are in the aircraft in question, it too is evaluated at 'true'(!!). Since in my case, both the 'ONCE' and 'SWITCHED CONDITION' triggers execute 'X: SET COMMAND (816)' (Active Pause toggle), Active Pause is turned On and then immediately Off :doh: Thom When you hit the wrong button on take-off System Specs. Spoiler System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27" CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
Rudel_chw Posted October 28, 2019 Posted October 28, 2019 ....Then when you enter an aircraft the 'ONCE' trigger is true, because it's the first time this aircraft was entered, PLUS when the 'SWITCHED CONDITION' trigger is evaluated, and since you are in the aircraft in question, it too is evaluated at 'true'(!!). Since in my case, both the 'ONCE' and 'SWITCHED CONDITION' triggers execute 'X: SET COMMAND (816)' (Active Pause toggle), Active Pause is turned On and then immediately Off :doh: On my case I added a Flag to prevent the trigger from being true twice while the player is still on the same aircraft, on my above sample the Flags are 102 and 103 (one for each client aircraft): 102: ON if aircraft used is Client 1: Cold Start 103: ON if aircraft used is Client 2: Air Start :) For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar Mobile: iPad Pro 12.9" of 256 GB
Captain Orso Posted October 28, 2019 Author Posted October 28, 2019 Yeah, I understand that. But I'm climbing into the same aircraft numerous times, not just once. Typically I fly A/C-1 for a while and use up all the bombs/rockets. Then I jump into the observer slot, so that I can then jump back in to A/C-1 and have a fresh set of weapons for more training/testing with the same bombs/rockets. When you hit the wrong button on take-off System Specs. Spoiler System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27" CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
Rudel_chw Posted October 28, 2019 Posted October 28, 2019 Yeah, I understand that. But I'm climbing into the same aircraft numerous times, not just once. Typically I fly A/C-1 for a while and use up all the bombs/rockets. Then I jump into the observer slot, so that I can then jump back in to A/C-1 and have a fresh set of weapons for more training/testing with the same bombs/rockets. OK, give a try to the attached mission ... it works as intended, but only if you unpause the Sim before leaving the plane to go into observer or onto another plane.Test.miz For work: iMac mid-2010 of 27" - Core i7 870 - 6 GB DDR3 1333 MHz - ATI HD5670 - SSD 256 GB - HDD 2 TB - macOS High Sierra For Gaming: 34" Monitor - Ryzen 3600 - 32 GB DDR4 2400 - nVidia RTX2080 - SSD 1.25 TB - HDD 10 TB - Win10 Pro - TM HOTAS Cougar Mobile: iPad Pro 12.9" of 256 GB
Captain Orso Posted October 29, 2019 Author Posted October 29, 2019 Hey Edwardo! that works, many thanks! :D Just a kind-of side question; not important, I just thought you might know offhand. I noted that setting the flags is ON or OFF, but querying them is TRUE or FALSE; other options along these lines are not available, so I assume that ON = TRUE and OFF = FALSE, correct? If a flag is set to a numeric value, is it then also TRUE? even if the value is '0'? There are scripting languages in Unix that work this way. In fact you you can pars weather a variable has ever been set before even if its current value is a null-string (string of characters of 0 length). Anyway, not important, and many thanks again :thumbup: Thom When you hit the wrong button on take-off System Specs. Spoiler System board: MSI X670E ACE Memory: 64GB DDR5-6000 G.Skill Ripjaw System disk: Crucial P5 M.2 2TB CPU: AMD Ryzen 7 7800X3D PSU: Corsair HX1200 PSU Monitor: ASUS MG279Q, 27" CPU cooling: Noctua NH-D15S Graphics card: MSI RTX 3090Ti SuprimX VR: Oculus Rift CV1
Recommended Posts