Gun rounds in zone - is it possible? - ED Forums
 


Notices

Reply
 
Thread Tools Display Modes
Old 06-30-2020, 07:58 AM   #1
sirrah
Senior Member
 
sirrah's Avatar
 
Join Date: Jun 2011
Location: Netherlands
Posts: 1,396
Default Gun rounds in zone - is it possible?

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)
Attached Thumbnails
Click image for larger version

Name:	2020_06_30_09_53_14_Digital_Combat_Simulator.jpg
Views:	17
Size:	21.0 KB
ID:	241322  
__________________
System specs:
Spoiler:
System specs: i7-8700K @stock speed - GTX 1080TI @ stock speed - AsRock Extreme4 Z370 - 32GB DDR4 @3GHz- HP Reverb v2 - Saitek Pro pedals - TM Warthog HOTAS - TM Cougar HOTAS (NN-Dan mod) - Pointctrl <-- must have for VR users!! - Andre's SimShaker Jetpad - Fully adjustable DIY playseat
sirrah is online now   Reply With Quote
Old 06-30-2020, 11:35 AM   #2
Sedlo
Member
 
Sedlo's Avatar
 
Join Date: Aug 2017
Posts: 640
Default

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)
Sedlo is offline   Reply With Quote
Old 06-30-2020, 12:11 PM   #3
sirrah
Senior Member
 
sirrah's Avatar
 
Join Date: Jun 2011
Location: Netherlands
Posts: 1,396
Default

Thank you Sedlo

You lost me at "you'll need to use a script" though
I have no idea where to even start with that and I'm too scared to open that pandora's box

Guess I'll have to rethink my mission for that part
__________________
System specs:
Spoiler:
System specs: i7-8700K @stock speed - GTX 1080TI @ stock speed - AsRock Extreme4 Z370 - 32GB DDR4 @3GHz- HP Reverb v2 - Saitek Pro pedals - TM Warthog HOTAS - TM Cougar HOTAS (NN-Dan mod) - Pointctrl <-- must have for VR users!! - Andre's SimShaker Jetpad - Fully adjustable DIY playseat
sirrah is online now   Reply With Quote
Old 06-30-2020, 01:32 PM   #4
Sedlo
Member
 
Sedlo's Avatar
 
Join Date: Aug 2017
Posts: 640
Default

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.
Sedlo is offline   Reply With Quote
Old 06-30-2020, 04:04 PM   #5
sirrah
Senior Member
 
sirrah's Avatar
 
Join Date: Jun 2011
Location: Netherlands
Posts: 1,396
Default

Quote:
Originally Posted by Sedlo View Post
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:
Spoiler:
System specs: i7-8700K @stock speed - GTX 1080TI @ stock speed - AsRock Extreme4 Z370 - 32GB DDR4 @3GHz- HP Reverb v2 - Saitek Pro pedals - TM Warthog HOTAS - TM Cougar HOTAS (NN-Dan mod) - Pointctrl <-- must have for VR users!! - Andre's SimShaker Jetpad - Fully adjustable DIY playseat
sirrah is online now   Reply With Quote
Old 07-04-2020, 03:13 AM   #6
Rokkett
Junior Member
 
Join Date: Feb 2012
Posts: 11
Default

Quote:
Originally Posted by sirrah View Post
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.
Rokkett is offline   Reply With Quote
Old 07-04-2020, 11:22 AM   #7
sirrah
Senior Member
 
sirrah's Avatar
 
Join Date: Jun 2011
Location: Netherlands
Posts: 1,396
Default

Quote:
Originally Posted by Rokkett View Post
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
__________________
System specs:
Spoiler:
System specs: i7-8700K @stock speed - GTX 1080TI @ stock speed - AsRock Extreme4 Z370 - 32GB DDR4 @3GHz- HP Reverb v2 - Saitek Pro pedals - TM Warthog HOTAS - TM Cougar HOTAS (NN-Dan mod) - Pointctrl <-- must have for VR users!! - Andre's SimShaker Jetpad - Fully adjustable DIY playseat
sirrah is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 05:55 PM. vBulletin Skin by ForumMonkeys. Powered by vBulletin®.
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.