609_Relentov Posted April 4, 2015 Posted April 4, 2015 I understand that if you put multiple triggers (i.e. rows) in the ME, they are treated as AND conditions. Also, if you put an OR in between two triggers, they will be treated as OR conditions. What if you mix and match - is there any way to group OR'd triggers and then AND them with another? I supposed I can test this, but I figured someone has tried this. For example: Goal: Condition-1 AND (Condition-2 OR Condition-3) Will this grouping occur in the ME if I do this?: Condition-1 Condition-2 OR Condition-3 If not, is the only way to do this to use an LUA PREDICATE trigger and do it via Lua code? Thanks, Relent
feefifofum Posted April 4, 2015 Posted April 4, 2015 (edited) Hey Relentov! This should take care of you 1 ONCE (conditions trigger) NO EVENT condition 1 condition 3 OR condition 1 condition 2 whatever happens Edited April 4, 2015 by feefifofum THE GEORGIAN WAR - OFFICIAL F-15C DLC
609_Relentov Posted April 4, 2015 Author Posted April 4, 2015 Thanks Feefi, so if this is the pattern it appears all of the adjacent AND conditions are grouped together as if they are in parentheses. I'll try it out thanks again.
feefifofum Posted April 4, 2015 Posted April 4, 2015 (edited) Yeah, you are limited to simple and/or statements, no nested statements unless you want to get into the .LUA stuff. When you incorporate the flags and counters though you can do some pretty sneaky stuff if you can puzzle it out. A little shameless self promotion here, but I am pretty proud of the complexity of the statements in some of my campaign stuff, and it's all labeled pretty clearly if you want to crack them open in the ME and check out the guts. Missions 1, 6 and 7 are probably the most interesting from a programming standpoint. 7 especially took me a minute to figure out how to get the "bug out" success vs "migs killed" success right, and involves a bunch of redundant flags across multiple conditions that all come down to whether a particular unit is in a particular place when all the flags go true. http://forums.eagle.ru/showthread.php?p=2349091#post2349091 I'm sure the same could be done with any number of the excellent user missions/campaigns on here, but I haven't dug around in the guts of anyone else's yet. EDIT: I should also mention that while I have been figuring out how to work within the constraints of the ME pretty well, I am also a rank amateur with regards to actual programming. I took Pascal and a year of C++ in high school. Which was longer ago than I care to admit. :lol: Should be a good look at the kinds of things you can do in the ME though, and you'll see the logic in the missions get progressively more complex as I learned how things work. The order I wrote them in was 2,3,4,1,5,6,7 Edited April 4, 2015 by feefifofum THE GEORGIAN WAR - OFFICIAL F-15C DLC
609_Relentov Posted April 4, 2015 Author Posted April 4, 2015 Cool thanks I'll give them a look - there's always room to learn more :)...
609_Relentov Posted April 7, 2015 Author Posted April 7, 2015 One more thing I've noticed with trigger conditions is combining RANDOM() with anything else. So far in my tests if you combine a RANDOM() with another condition (i.e. two adjacent rows) such as TIME MORE(), the condition seems to act like an OR. I used RANDOM(1) (i.e. 1%) and the trigger was always being set. Apparently you can only use a RANDOM() by itself or the random part doesn't work right - has anyone else had this happen as well?
Wrecking Crew Posted April 7, 2015 Posted April 7, 2015 If you use a Random() function on a ONCE type event then it should work. But if it is a Switched Condition or Continuous then after some time goes by the Random() will become True. I will use Random() on a Mission Start and set a flag to the value, like set Flag 4 to random 1-4. Then I use Flag(4) = x as a Condition for subsequent events. WC Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
609_Relentov Posted April 7, 2015 Author Posted April 7, 2015 Thanks WC - this was with a ONCE type, which is why I was puzzled. I'll do some more testing to see if I've missed something.
Wrecking Crew Posted April 7, 2015 Posted April 7, 2015 Post the miz and I can look at it. A year ago or so I made a Random test mission. Here is the thread, see my post in it. http://forums.eagle.ru/showthread.php?t=123626&highlight=random+wc WC Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
Wrecking Crew Posted April 7, 2015 Posted April 7, 2015 Here's another conversation -- http://forums.eagle.ru/showthread.php?t=94198&highlight=random+grimes WC Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
Wrecking Crew Posted April 7, 2015 Posted April 7, 2015 This is the important one. Grimes talks about Random and a Once trigger, like what you did -- Mission Start>Random x%>Group Activate(whatever) it should be that because it will only be evaluated once at mission start. With Once>RandomX%>Group Activate(whatever) it will keep evaluating the trigger until it becomes true. So every group will spawn anyways after just a few seconds. http://en.wiki.eagle.ru/wiki/Mission...Trigger_Basics http://forums.eagle.ru/showthread.php?t=117326&highlight=random+grimes What I said above about using Random and Once being OK was incorrect -- my answer kept nagging at me. WC Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
609_Relentov Posted April 7, 2015 Author Posted April 7, 2015 Thanks WC - I think you uncovered the issue (I guess I didn't search enough on the random issue). I noticed that my low random percent trigger was always happening, but it didn't click that sometimes it took longer - doh!. So even using a random by itself it won't work as you suspect if you use it as a ONCE type (as if it's false it keeps evaluating), you need to use it as a MISSION START type for it to truly evaluate the randomness only one time. I'll make the adjustments and see how the mission plays out. Thanks! Relent
gavagai Posted June 26, 2015 Posted June 26, 2015 Hey Relentov! This should take care of you 1 ONCE (conditions trigger) NO EVENT condition 1 condition 3 OR condition 1 condition 2 whatever happens Correct, but condition1 and (condition2 or condition3) requires less writing. Now, just imagine if I want something like this: (condition1 or condition2...or condition9) and conditionA and (conditionB or (conditionC or conditionD)) Very tedious. Is there some kind of wishlist thread for parentheses in the mission editor? It would be very useful. Good thread, thanks.:) P-51D | Fw 190D-9 | Bf 109K-4 | Spitfire Mk IX | P-47D | WW2 assets pack | F-86 | Mig-15 | Mig-21 | Mirage 2000C | A-10C II | F-5E | F-16 | F/A-18 | Ka-50 | Combined Arms | FC3 | Nevada | Normandy | Straight of Hormuz | Syria
Wrecking Crew Posted June 26, 2015 Posted June 26, 2015 Very tedious. Is there some kind of wishlist thread for parentheses in the mission editor? It would be very useful. Not in the ME, but you can combine the arguments in LUA script (i'm not the guy to tell you how though...). In the regular ME the Or and And could be broken up into different events, with further events to do the final logic. WC Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
feefifofum Posted June 26, 2015 Posted June 26, 2015 (edited) H Very tedious. Sure is. You're preaching to the choir bud. EDIT: Since you've made me think about it now... 1 ONCE (set 1 true, NO EVENT) / condition 1 OR ...condition 9 / FLAG ON (1) 1 ONCE (set 2 true, NO EVENT) / condition A / FLAG ON (2) 1 ONCE (set 3 true, NO EVENT) / condition B / FLAG ON (3) 1 ONCE (set 4 true, NO EVENT) / condition C OR condition D / FLAG ON (4) Then you wind up with- col 1: 1 ONCE (all the things, NO EVENT) col 2: FLAG IS TRUE (1) FLAG IS TRUE (2) FLAG IS TRUE (3) OR FLAG IS TRUE (1) FLAG IS TRUE (2) FLAG IS TRUE (4) col 3: MESSAGE TO ALL ("I'm so complicated!", 10) Edited June 26, 2015 by feefifofum THE GEORGIAN WAR - OFFICIAL F-15C DLC
Wrecking Crew Posted June 26, 2015 Posted June 26, 2015 LOL Karno maps... Visit the Hollo Pointe DCS World server -- an open server with a variety of COOP & H2H missions including Combined Arms. All released missions are available for free download, modification and public hosting, from my Wrecking Crew Projects site.
Recommended Posts