Gierasimov Posted March 12, 2020 Share Posted March 12, 2020 Is it possible, to create a multi missile in zone trigger in ME? Is there a script for the action like this. Player is in zone. Player shots AIM120C or AIM9X Call is made over radio for either Fox3 or Fox2. With ME I can achieve this for the first weapon shot of each type, but not for subsequent release of the same weapon. Intel i7-13700KF :: ROG STRIX Z790-A GAMING WIFI D4 :: Corsair Vengeance LPX 64GB :: MSI RTX 4080 Gaming X Trio :: VKB Gunfighter MK.III MCG Ultimate :: VPC MongoosT-50 CM3 :: non-VR :: single player :: open beta Link to comment Share on other sites More sharing options...
A101Wayz Posted March 12, 2020 Share Posted March 12, 2020 How would you go about doing this in the ME? If it's a matter of a ONCE trigger, change it to a SWITCHED CONDITION... Wayz Out Intel Core i9 9900K | ASUS ROG Strix Z390E Gaming MB | G.Skill Ripjaws V 32gb DDR4-3200 | GeForce RTX 2080 Ti | Samsung 970 EVO Plus NVMe HTC Vive Pro VR | Logitech G x56 HOTAS | Logitech G PRO Pedals Link to comment Share on other sites More sharing options...
Gierasimov Posted March 13, 2020 Author Share Posted March 13, 2020 Not quite I am using switched condition trigger, but this is what it does - The first time the missile enters the zone, the trigger action will be activated, because the previous check of the trigger conditions was evaluated as false (missile was not in zone). The trigger will not activate any longer as long as the missile is inside the zone, because the previous check of the trigger conditions will be evaluated as true (missile remains inside zone). However, if the missile exits the zone and then re-enters it again, the conditions will have once again switched from false to true and the trigger action will be activated. So, my pilot will call Fox Three on the first AMRAAM, but not if I fire any follow-ups, hence the question. A solution would be if I was able to use MISSILE IN MOVING ZONE condition, just like I can do with a UNIT. But MISSILE IN ZONE is the only one available. Intel i7-13700KF :: ROG STRIX Z790-A GAMING WIFI D4 :: Corsair Vengeance LPX 64GB :: MSI RTX 4080 Gaming X Trio :: VKB Gunfighter MK.III MCG Ultimate :: VPC MongoosT-50 CM3 :: non-VR :: single player :: open beta Link to comment Share on other sites More sharing options...
feefifofum Posted March 14, 2020 Share Posted March 14, 2020 Your best option in this case is an event handler that searches for guidance type based in the SHOT event. I'll see if I have an example floating around somewhere. THE GEORGIAN WAR - OFFICIAL F-15C DLC Link to comment Share on other sites More sharing options...
Reflected Posted March 14, 2020 Share Posted March 14, 2020 I’m interested in this too! Let me give it a try. Facebook Instagram YouTube Discord Link to comment Share on other sites More sharing options...
kaba Posted March 14, 2020 Share Posted March 14, 2020 I put this together some months ago from code I found posted on the forum. This will activate a different flag for Fox 1, 2 and 3 fired by a unit called _Player. See if this helps FoxplusHandler = {} function FoxplusHandler:onEvent(event) if event.id == world.event.S_EVENT_SHOT and event.initiator == Unit.getByName('_Player') then local _wpn = event.weapon:getDesc() local _wpnType = _wpn.guidance if _wpnType == 4 then trigger.action.setUserFlag('1001', true) end if _wpnType == 2 then trigger.action.setUserFlag('1002', true) end if _wpnType == 3 then trigger.action.setUserFlag('1003', true) end end end world.addEventHandler(FoxplusHandler) Link to comment Share on other sites More sharing options...
Reflected Posted March 15, 2020 Share Posted March 15, 2020 Can it be done without scripts? The "On Shot" event is active whenever anyone fires, or just the player? That's the tricky part: how do I ensure it only activates when the player fires? Facebook Instagram YouTube Discord Link to comment Share on other sites More sharing options...
Sedlo Posted March 15, 2020 Share Posted March 15, 2020 On shot is when anyone fires, AI/Player, etc... You've got to use a script, but luckily the one above works very well. My Youtube Channel MY DCS MISSIONS Link to comment Share on other sites More sharing options...
feefifofum Posted March 15, 2020 Share Posted March 15, 2020 Indeed no way to do this without an event handler. Kaba's is exactly the right thing though, all you need to do is detect and reset the flags using the regular old ME. THE GEORGIAN WAR - OFFICIAL F-15C DLC Link to comment Share on other sites More sharing options...
Reflected Posted March 15, 2020 Share Posted March 15, 2020 Brilliant, works like a charm, thanks Kaba! Facebook Instagram YouTube Discord Link to comment Share on other sites More sharing options...
xXMustangXx Posted March 15, 2020 Share Posted March 15, 2020 I put this together some months ago from code I found posted on the forum. This will activate a different flag for Fox 1, 2 and 3 fired by a unit called _Player. See if this helps FoxplusHandler = {} function FoxplusHandler:onEvent(event) if event.id == world.event.S_EVENT_SHOT and event.initiator == Unit.getByName('_Player') then local _wpn = event.weapon:getDesc() local _wpnType = _wpn.guidance if _wpnType == 4 then trigger.action.setUserFlag('1001', true) end if _wpnType == 2 then trigger.action.setUserFlag('1002', true) end if _wpnType == 3 then trigger.action.setUserFlag('1003', true) end end end world.addEventHandler(FoxplusHandler) How would you change this if you wanted to apply this to a group instead of a unit? Thanks Link to comment Share on other sites More sharing options...
Sedlo Posted March 15, 2020 Share Posted March 15, 2020 You can't, the event handler Units. My Youtube Channel MY DCS MISSIONS Link to comment Share on other sites More sharing options...
xXMustangXx Posted March 15, 2020 Share Posted March 15, 2020 You can't, the event handler Units. Got it! Can the event handler be duplicated (or Times three) to handle 2 or 3 diff units? i'll guess i'll try anyways... Thanks!! Link to comment Share on other sites More sharing options...
Sedlo Posted March 16, 2020 Share Posted March 16, 2020 Yes, you can do that... I think you can make a table of units to call as well, but I don't know exactly how. My Youtube Channel MY DCS MISSIONS Link to comment Share on other sites More sharing options...
xXMustangXx Posted March 16, 2020 Share Posted March 16, 2020 Got it! Can the event handler be duplicated (or Times three) to handle 2 or 3 diff units? i'll guess i'll try anyways... Thanks!! just in case anybody is interested... Yes it works! 1 event handler per user! Link to comment Share on other sites More sharing options...
xXMustangXx Posted March 16, 2020 Share Posted March 16, 2020 Yes, you can do that... I think you can make a table of units to call as well, but I don't know exactly how. i'll try to play with that too Thanks! Link to comment Share on other sites More sharing options...
Rookie1983 Posted September 13, 2020 Share Posted September 13, 2020 It can be done through 1 or 2 trigger " X:COCKPIT INDICATION HAS TEXT ". For which plane and what kind of weapon? Link to comment Share on other sites More sharing options...
Recommended Posts