ENO Posted April 22, 2013 Posted April 22, 2013 Eh guys. I've read a bunch about the difference and it seems obvious- but one thing I'm having a hard time getting my head around is this: If I'm "Counting" units in zone (through flags with "unit in zone flag increase value 1") do I do a switched condition or a continuous. I also have "unit out of zone decrease value 1" to account for when the unit is out of the theater. My logic is that I use a switched condition- except that I'm wondering if this means that when a unit is brought into the zone it will increase value, but if this same unit goes out of zone it will ALSO increase value. My concern with "continuous" is that if the unit is in the zone, every second that it is in the zone the flag value will increase. Obviously if I use it only once, then when players come and go, the flag will cease to exist altogether. I guess what I'm wanting to know is whether "continuous" means that once the aircraft is in the zone it will add value. If it leaves and comes back in it will add value- not add value the whole time the condition is found to be true. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Grimes Posted April 22, 2013 Posted April 22, 2013 http://en.wiki.eagle.ru/wiki/Mission_Editor:_Trigger_Basics If you have a trigger: Continuous >Unit In Zone> Flag 1 increase 1 Flag 1 will count up for each second the unit is in the zone. If you have: Switched Condition>Unit in Zone> Flag 1 Increase 1 It will count up once each time the unite ENTERS the zone. It must first exit the zone and re-enter for it to count up again. My favorite alternative is to simply use scripting, but my OTHER favorite alternative is to use mission goals! Create a mission goal of "Unit in Zone gives the blue team 1 point" for each client aircraft. When the unit spawns in, the score will automatically adjust to reflect how many aircraft are in the mission. Then create a bunch of triggers to compare the values or do whatever it is you want to do based on player count. Switched Condition>Mission goal more than 0 >One player is in mission Switched Condition>Mission goal is more than 3 and Less than 8> 4 to 7 players are in mission, activate task meant for 4 to 7 players etc. 1 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
ENO Posted April 22, 2013 Author Posted April 22, 2013 But unlike other flags with the mission goal will it automatically decrease values when someone leaves? "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
Grimes Posted April 22, 2013 Posted April 22, 2013 (edited) Yep. Each aircraft is worth 1 point. The score starts at 0. If one aircraft spawns in, the score + 1, and so on. If an aircraft leaves it removes their score. Its all done automatically. Its basically the same thing that the scripting engine would use, where you would do something like: local count = 0 for unitId, unitData in pairs(mist.DBs.clientsByName) do if Unit.getByName(unitId) then count = count + 1 end end Edited April 22, 2013 by Grimes 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
ENO Posted April 22, 2013 Author Posted April 22, 2013 Holy crap. Knowing that a week or so ago would have saved me from creating a Star Wars movie worth of clones. Thanks grimes. "ENO" Type in anger and you will make the greatest post you will ever regret. "Sweetest's" Military Aviation Art
baltic_dragon Posted April 11, 2014 Posted April 11, 2014 Adding to that - I am creating a mission where the player has to fly as close to the border as possible. I've set up trigger zones along the border with switched condition and setting flag 1 to true once player or his wingman enters the zone. My question is as follows: When player enters the zone flag 1 is set to true. This will change the Russian AA RoE from hold to weapons free. Will leaving the zone return the flag to false? And - subsequently - with flag being false, the AA status back to "Hold weapons"? (the AA behaviour was set via advanced waypoint -> options -> Weapons free -> condition -> flag 1 true.) For more information, please visit my website. If you want to reach me with a bug report, feedback or a question, it is best to do this via my Discord channel. Details about the WinWing draw can be found here. Also, please consider following my channel on Facebook.
Recommended Posts