sirrah Posted June 30, 2020 Posted June 30, 2020 I want to create a scenario where the player needs to give a warning shot with guns Is this somehow possible by using the "Bomb in zone" trigger? Not sure what abbreviation is used for gun rounds (if it's at all listed) System specs: i7-8700K @stock speed - GTX 1080TI @ stock speed - AsRock Extreme4 Z370 - 32GB DDR4 @3GHz- 500GB SSD - 2TB nvme - 650W PSU HP Reverb G1 v2 - Saitek Pro pedals - TM Warthog HOTAS - TM F/A-18 Grip - TM Cougar HOTAS (NN-Dan mod) & (throttle standalone mod) - VIRPIL VPC Rotor TCS Plus with ALPHA-L grip - Pointctrl & aux banks <-- must have for VR users!! - Andre's SimShaker Jetpad - Fully adjustable DIY playseat - VA+VAICOM - Realsimulator FSSB-R3 ~ That nuke might not have been the best of ideas, Sir... the enemy is furious ~ GUMMBAH
Sedlo Posted June 30, 2020 Posted June 30, 2020 It's not there, you'll need to use a script... Below will set flag 200 to true when the unit name shoots their gun or rocket. Handler = {} function Handler:onEvent(event) if event.id == world.event.S_EVENT_SHOOTING_START and event.initiator == Unit.getByName('Unit Name Here') then trigger.action.setUserFlag('200', true) end end world.addEventHandler(Handler) 1 My Youtube Channel MY DCS MISSIONS
sirrah Posted June 30, 2020 Author Posted June 30, 2020 Thank you Sedlo You lost me at "you'll need to use a script" though :lol: I have no idea where to even start with that and I'm too scared to open that pandora's box :P Guess I'll have to rethink my mission for that part System specs: i7-8700K @stock speed - GTX 1080TI @ stock speed - AsRock Extreme4 Z370 - 32GB DDR4 @3GHz- 500GB SSD - 2TB nvme - 650W PSU HP Reverb G1 v2 - Saitek Pro pedals - TM Warthog HOTAS - TM F/A-18 Grip - TM Cougar HOTAS (NN-Dan mod) & (throttle standalone mod) - VIRPIL VPC Rotor TCS Plus with ALPHA-L grip - Pointctrl & aux banks <-- must have for VR users!! - Andre's SimShaker Jetpad - Fully adjustable DIY playseat - VA+VAICOM - Realsimulator FSSB-R3 ~ That nuke might not have been the best of ideas, Sir... the enemy is furious ~ GUMMBAH
Sedlo Posted June 30, 2020 Posted June 30, 2020 It’s not hard. Just copy and paste the code into a “do script” action (far left column of mission editor). Don’t forget to change the unit name to whatever your unit is called. Then make a new condition that whenever flag 200 is true, whatever you want to happen, happens. I was very reluctant to dive into the world of scripting, but it turns out to be much easier than you think. Plus it’s very useful! And there is no shortage of people here willing to help. 1 My Youtube Channel MY DCS MISSIONS
sirrah Posted June 30, 2020 Author Posted June 30, 2020 It’s not hard. Just copy and paste the code into a “do script” action (far left column of mission editor). Don’t forget to change the unit name to whatever your unit is called. Then make a new condition that whenever flag 200 is true, whatever you want to happen, happens. I was very reluctant to dive into the world of scripting, but it turns out to be much easier than you think. Plus it’s very useful! And there is no shortage of people here willing to help. Ok, I'll give it a go System specs: i7-8700K @stock speed - GTX 1080TI @ stock speed - AsRock Extreme4 Z370 - 32GB DDR4 @3GHz- 500GB SSD - 2TB nvme - 650W PSU HP Reverb G1 v2 - Saitek Pro pedals - TM Warthog HOTAS - TM F/A-18 Grip - TM Cougar HOTAS (NN-Dan mod) & (throttle standalone mod) - VIRPIL VPC Rotor TCS Plus with ALPHA-L grip - Pointctrl & aux banks <-- must have for VR users!! - Andre's SimShaker Jetpad - Fully adjustable DIY playseat - VA+VAICOM - Realsimulator FSSB-R3 ~ That nuke might not have been the best of ideas, Sir... the enemy is furious ~ GUMMBAH
Rokkett Posted July 4, 2020 Posted July 4, 2020 I want to create a scenario where the player needs to give a warning shot with guns Is this somehow possible by using the "Bomb in zone" trigger? Not sure what abbreviation is used for gun rounds (if it's at all listed) Another way you could do this is, for the trigger zone, create a new trigger and select the "On shot" condition from the pull down menu. In this way, any weapon fired, including the gun, should then activate the trigger.
sirrah Posted July 4, 2020 Author Posted July 4, 2020 Another way you could do this is, for the trigger zone, create a new trigger and select the "On shot" condition from the pull down menu. In this way, any weapon fired, including the gun, should then activate the trigger. Ok interesting thanks :thumbup: System specs: i7-8700K @stock speed - GTX 1080TI @ stock speed - AsRock Extreme4 Z370 - 32GB DDR4 @3GHz- 500GB SSD - 2TB nvme - 650W PSU HP Reverb G1 v2 - Saitek Pro pedals - TM Warthog HOTAS - TM F/A-18 Grip - TM Cougar HOTAS (NN-Dan mod) & (throttle standalone mod) - VIRPIL VPC Rotor TCS Plus with ALPHA-L grip - Pointctrl & aux banks <-- must have for VR users!! - Andre's SimShaker Jetpad - Fully adjustable DIY playseat - VA+VAICOM - Realsimulator FSSB-R3 ~ That nuke might not have been the best of ideas, Sir... the enemy is furious ~ GUMMBAH
Tree_Beard Posted July 19, 2023 Posted July 19, 2023 On 6/30/2020 at 4:35 AM, Sedlo said: It's not there, you'll need to use a script... Below will set flag 200 to true when the unit name shoots their gun or rocket. Handler = {} function Handler:onEvent(event) if event.id == world.event.S_EVENT_SHOOTING_START and event.initiator == Unit.getByName('Unit Name Here') then trigger.action.setUserFlag('200', true) end end world.addEventHandler(Handler) Hi, sorry to resurrect an old thread but I am trying to accomplish something similar and I am wondering if you could also help me out. I want to have a flag triggered by the player shooting their cannon either at a specific building or within a very small trigger zone on the map. The idea would be to allow the player to, for example, "suppress a sniper" who is "hiding" within that building. Do you know of a script that would work for that?
Sedlo Posted July 20, 2023 Posted July 20, 2023 I don't know how get rounds in z zone, to be honest. Beyond my scripting abilities. The best I can offer is the script above, which will set a flag true when a unit fires its gun. Then you could... You can set conditions in the editor... for example, the player has to be within say 1.5 miles of the target, the player has to be below XXXX feet... You could set a series of OR conditions, to make this work. Set a zone north of the target say 1.5 miles square. Call it north zone. Put to the west, call it west, put one south, put one west. Conditions: Player must be in 'north' zone, player's heading within limits: 135-225 degrees. Player's altitude below 5000ft, flag 200 is true. OR Player must be in 'west' zone, player's heading within limits: 045-135 degrees. Player's altitude below 5000ft, flag 200 is true. OR etc, etc... Then for actions you can call it suppressed.. turn off it's AI, blow it up, whatever you want to do. Set it up as detailed as you want it to be. It won't be 100% accurate, but maybe enough that a unit on the ground would be suppressed. 1 My Youtube Channel MY DCS MISSIONS
Recommended Posts