CY6_Anubis Posted April 16, 2010 Posted April 16, 2010 (edited) Hello again Mission builders... In this case I´m trying to simulate some flak while flying over an area... I use a mid size trigger zone as "flaking zone" and several small areas within the big one as explosion areas. I was trying several ways but I cannot manage to do it correctly. What I do is the following: Continuous-->Unit1 inside Zone or Unit2 inside Zone or ...-->set flag1 With this, I activate the flak if ANY unit is inside the flaking zone. (The "or" will be done via notepad++) Continuous-->Unit1 outside Zone and Unit2 outside Zone and... -->clear flag1 With this, if ALL of the units are outside flaking zone, fire will stop. ---- the following part is where I need help---- I need to set up the explosions only if flag1 is true (any unit inside zone) and I want the explosions to happen 2 seconds after the previous one. explosion1 happens, 2 seconds later explosion 2, 2 seconds later explosion3, and so on... and when explosion 10 is finished and if the units are still in the zone, I want the whole circuit to start again (expl1, expl2...) Hope I made myself clear because is something a little bit difficult to explain. Thanks a lot in advance. Edited April 18, 2010 by CY6_Anubis Female Journalist to Churchill: If I were your wife, I´d put poison in your coffee. Churchill´s answer: If you were my wife, I´D DRINK IT!
Grimes Posted April 16, 2010 Posted April 16, 2010 (edited) Oh man, That sounds like fun! Switched Condition> Time Since Flag 1 (2) > Set Flag 2, Explode 1 Switched Condition> Time Since Flag 2 (2), Flag 1 is True > Set Flag 3, Explode 2 Switched Condition> Time Since Flag 3 (2), Flag 1 is True > Set Flag 4, Explode 3 and so on. As long as flag 1 is true the explosions will happen, once flag 1 is false they will stop. Once they leave the zone do a "Clear All" condition where it clears all of the flags that activate the flak, so it never gets "stuck" anywhere in the triggers. Edited April 16, 2010 by Grimes 2 The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
CY6_Anubis Posted April 16, 2010 Author Posted April 16, 2010 (edited) Great Grimes, I´ve just tested and it works almost perfectly. The only thing left now is that after the 3rd explosion (or the 4th, or whatever) the loop begins again. PS: Would be great to have a While Do looping system! Edit: Ok, I´ve figured it out! I have to add another "set flag 1" to the last explosion and the loop starts again! Thanks again Grimes, I had tried almost everything except the switched condition! + rep for you! Edited April 16, 2010 by CY6_Anubis 1 Female Journalist to Churchill: If I were your wife, I´d put poison in your coffee. Churchill´s answer: If you were my wife, I´D DRINK IT!
h00t74 Posted April 18, 2010 Posted April 18, 2010 Would love to see some video of this effect or screenshots. Sounds very promising!!
CY6_Anubis Posted April 18, 2010 Author Posted April 18, 2010 No problem Hoot, I´ll do a little video and I´ll post it. PS: This is related to a post that I´ve written in the "Wish list"... if we could group trigger zones in a template, we could have a "Flak Template" to use without having to add all the small explosion zones over and over again. Female Journalist to Churchill: If I were your wife, I´d put poison in your coffee. Churchill´s answer: If you were my wife, I´D DRINK IT!
GaryIKILLYOU Posted April 18, 2010 Posted April 18, 2010 No problem Hoot, I´ll do a little video and I´ll post it. PS: This is related to a post that I´ve written in the "Wish list"... if we could group trigger zones in a template, we could have a "Flak Template" to use without having to add all the small explosion zones over and over again. That would be amazing to have. Just load it in and click fly.:P My Specs:Win 10 Pro 64bit/ i7 6770K 4.5Ghz/32GB DDR4/ GTX 1070 SC/Samsung SSD Warthog Stick/TWCS Throttle/TrackIR 5
Dredge Posted April 19, 2010 Posted April 19, 2010 Would love to see some video of this effect or screenshots. Sounds very promising!! Noooooooo! Dont give Thumper any ideas......his "SAM nests are bad enough":wallbash: Virtaul 66th XO [sIGPIC][/sIGPIC]
Esac_mirmidon Posted April 19, 2010 Posted April 19, 2010 Anubis, could you write the complete code that works for you here please? This is a very interesting trigger. 1 " You must think in russian.." [sIGPIC][/sIGPIC] Windows 7 Home Premium-Intel 2500K OC 4.6-SSD Samsung EVO 860- MSI GTX 1080 - 16G RAM - 1920x1080 27´ Hotas Rhino X-55-MFG Crosswind Rudder Pedals -Track IR 4
CY6_Anubis Posted April 20, 2010 Author Posted April 20, 2010 Noooooooo! Dont give Thumper any ideas......his "SAM nests are bad enough":wallbash: Hummmm... dangerous ideas in the wrong/dangerous hands leads to.... EVEN MORE DANGEROUS SITUATIONS. I LIKE IT A LOTTTTTTTTTT :joystick: Female Journalist to Churchill: If I were your wife, I´d put poison in your coffee. Churchill´s answer: If you were my wife, I´D DRINK IT!
CY6_Anubis Posted April 20, 2010 Author Posted April 20, 2010 (edited) Ok, here is the complete code for flak simulation: Create a trigger zone for flak activity This will be the area that if entered, will make the flak to start. I called it "Flaking Zone" Create multiple small trigger zones for explosions Create as many zones as different explosions you want. If you want explosions in 10 different places, create 10 small trigger zones. (size can be 10). It´s important that these small zones are inside the big "Flaking Zone". If they´re outside, it will work anyway, but won´t be very realistic. You can call these small zones "explozones1", "explozone2", etc, etc. Create the following triggers switched->unit inside zone(unit1,flaking zone)->set flag 1 switched->unit outside zone(unit1,flaking zone)->clear flag 1 switched->time since flag(flag1, 1 second)->explosion(explozone1,altitude,volume),set flag 2 switched->time since flag(flag2, 1 second)->explosion(explozone2,altitude,volume),set flag 3 switched->time since flag(flag3, 1 second)->explosion(explozone3,altitude,volume),set flag 4 ... the last trigger (let´s suppose 10 explosions), should be like this: switched->time since flag(flag3, 1 second)->explosion(explozone3,altitude,volume),set flag 1 IMPORTANT: If you don´t set flag 1 to the last trigger, the loop will not begin again even if the units are inside the Flak Zone. I´ve used only 1 unit to activate the sequence but here´s my tip: Only 1 unit inside Flak Zone should be needed to start the action (OR statement) ALL the units should be outside the zone for flak to stop. Mission Editor always uses AND. Check -THIS THREAD- to learn how to change the AND to OR. That way, if you want flak to stop, you have to order all your wingmem to exit the zone, and until the last one is out, flak will continue. Another detail to add realism can be to add an altitude condition, so units have to be INSIDE zone and between certain altitude... If you have any doubt don´t hesitate to ask. Hope this helped you. @Mirmidon: By the way, I live in Benicarló, Castellón. Edited April 20, 2010 by CY6_Anubis 1 Female Journalist to Churchill: If I were your wife, I´d put poison in your coffee. Churchill´s answer: If you were my wife, I´D DRINK IT!
Esac_mirmidon Posted April 21, 2010 Posted April 21, 2010 Jeje, tio haberlo dicho antes. Muchas gracias por la aclaración. " You must think in russian.." [sIGPIC][/sIGPIC] Windows 7 Home Premium-Intel 2500K OC 4.6-SSD Samsung EVO 860- MSI GTX 1080 - 16G RAM - 1920x1080 27´ Hotas Rhino X-55-MFG Crosswind Rudder Pedals -Track IR 4
Boberro Posted April 21, 2010 Posted April 21, 2010 Nice! Is there way to copy-paste code than annoying creation of new triggers in ME ? Reminder: Fighter pilots make movies. Bomber pilots make... HISTORY! :D | Also to be remembered: FRENCH TANKS HAVE ONE GEAR FORWARD AND FIVE BACKWARD :D ಠ_ಠ ツ
CY6_Anubis Posted April 21, 2010 Author Posted April 21, 2010 Jeje, tio haberlo dicho antes. Muchas gracias por la aclaración. :D Es que en inglés le servirá a más gente! Saludos! Female Journalist to Churchill: If I were your wife, I´d put poison in your coffee. Churchill´s answer: If you were my wife, I´D DRINK IT!
CY6_Anubis Posted April 21, 2010 Author Posted April 21, 2010 Nice! Is there way to copy-paste code than annoying creation of new triggers in ME ? Not that I know, I´m sorry. Unless you mess with the .miz file. I agree that it should be easier to do those kind of repetitive actions instead of entering one by one. Female Journalist to Churchill: If I were your wife, I´d put poison in your coffee. Churchill´s answer: If you were my wife, I´D DRINK IT!
Stratos Posted April 21, 2010 Posted April 21, 2010 Coño un Benicarlando en el foro de Lomac lo k me faltaba por ver! Bienvenido Anubis! I don't understand anything in russian except Davai Davai!
Grimes Posted April 21, 2010 Posted April 21, 2010 Nice! Is there way to copy-paste code than annoying creation of new triggers in ME ? Messing with the mission in the .miz file is the only way. I've come to rely on that method. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum
CY6_Anubis Posted April 24, 2010 Author Posted April 24, 2010 Coño un Benicarlando en el foro de Lomac lo k me faltaba por ver! Bienvenido Anubis! No me irás a decir que eres de Vinaros, verdad? :D Female Journalist to Churchill: If I were your wife, I´d put poison in your coffee. Churchill´s answer: If you were my wife, I´D DRINK IT!
h00t74 Posted April 25, 2010 Posted April 25, 2010 You are a Genious at work my friend. I just tested it. It is Sexy. 12 second clip
Boberro Posted August 10, 2010 Posted August 10, 2010 I wanted to create flaks but WTF it is not working... Could anyone post a mission with working FLAK script inside? I'd be grateful. Reminder: Fighter pilots make movies. Bomber pilots make... HISTORY! :D | Also to be remembered: FRENCH TANKS HAVE ONE GEAR FORWARD AND FIVE BACKWARD :D ಠ_ಠ ツ
Boberro Posted August 10, 2010 Posted August 10, 2010 Nevermind it works! It really adds nice immersion to LO... I regret it has to be done by triggers, it is annoying :] Reminder: Fighter pilots make movies. Bomber pilots make... HISTORY! :D | Also to be remembered: FRENCH TANKS HAVE ONE GEAR FORWARD AND FIVE BACKWARD :D ಠ_ಠ ツ
Recommended Posts