CarlGustaffa 4 Posted April 10, 2007 Hi Having problems with ending my mission based on boolean or integer variables. I put in radioAlpha (for quick testing) activation trigger iSeized=2 (fully seized, incl some other objectives regarding destroyed vehicles), and in my so called Win trigger I check against condition iSeized==2. Using it as a lose trigger it works, but setting it as a win1 trigger, nothing happens. The briefing.html contains some debriefing sections labelled i.e. name="Debriefing:End1" in the end of the file, but not sure if this is related to the trigger not working. Where might my mistake be? Edit: Btw, the end trigger actually works, since the text I put in as an effect shows up. But the mission doesn't end with the correct debrief. Edit2: Oh darnit! Never mind!! I didn't wait for the ending to actually take place, as it delays 3-4 seconds to happen. :S Debriefing shows up too. Oh well, lesson learned Share this post Link to post Share on other sites
the unknown 0 Posted April 10, 2007 You could try a work around. Make a variable that gets set to true in that trigger. The make another one that gets activated by the variable then set it to end the mission. Edit: Isnt it wonderfull how we learn someting everyday :P Share this post Link to post Share on other sites
CarlGustaffa 4 Posted April 10, 2007 Hehe, it is But also a bit painful since always tend to end up in different difficulties each day... Such as this new one: I have a "minimum required objectives" setup to even start the endmission system. This consist of i.e. 3 objectives being met. However, one of these objectives is to destroy a tank with a 70% probability even showing up on the map. For the objectives, it works fine, as the objective doesn't show up if the tank doesn't appear or is killed in a minefield. But how do I add this as a minimum condition for the ending system to trigger? I.e. in the condition field (b denotes a boolean value): bObjA && bObjB && bObjT72 What I need is something like this as a single condition: if bT72Activated (set by the tank itself if it enters the map) then requirements are bObjA && bObjB && bObjT72 else requirements are bObjA && bObjB However, there is a twist here. By default the bObjT72 is set to "HIDDEN", and it will run over some mines within a trigger. Only if the tank makes it out of the trigger will the status (kill that tank) be set to "ACTIVE". If the mines kill the tank it will not show as an objective, and as such it willl not be a required objective to start the endmission system. How on earth would such a syntax look like for a condition field? Share this post Link to post Share on other sites
Heatseeker 0 Posted April 10, 2007 Uh... maybe this can help. You can use multiple endings. from 1 to 6. End #1 ticked by obj1 and obj2 and obj3. End #2 ticked by obj1 and obj2. Simple . Share this post Link to post Share on other sites
CarlGustaffa 4 Posted April 12, 2007 Hi This reply is mostly for fellow newbies, as I'm sure it's very obvious to the vets. Yes, I obviously use more than one ending, but because of that T72 that has several "modes", it caused me some confusion. But yesterday I had a little breakthrough, and I think I'll be able to handle that tank tomorrow I use now the following for my end system: iSeized=2 IF iSeized==1 (objective) && bBmp (objective) && bShilkas (objective). These three objectives *need* to be done before the ending system will activate, but all "required" tasks doesn't actually "need" to be done. Prepare for ending IF minimum conditions are met (iSeized==2) Play some music, and let player have some additional time to complete optional objectives. IF iSeized==2 THEN play music, bWaitForMusic=true Okay, music has ended and it is time to actually activate the end triggers: End1: bWaitForMusic && !(bChoppers) && !(bRadio) Gives a minimum win, say; score 100. Remember that the minimal win condition, iSeized=2, is already checked above prior to the bWaitForMusic being set. End2: bWaitForMusic && bChoppers && !(bRadio) Gives a small win, say score 300, since bRadio was marked as a required objective, but actually isn't. End3: bWaitForMusic && !(bChoppers) && bRadio Gives the medium win, say score 600, since the "required" but hard to do radiotower was destroyed. End4: bWaitForMusic && bChoppers && bRadio Gives a maximum win, say score 1000, since all required and optional tasks were complete. Now, for other newbies the following might be interresting I could not get these triggers to work properly because of one single yet extremely important thing: Even with radiotriggers to "set it off", I could not get i.e. the !(bChoppers) to work, and I couldn't believe why. Then I set another radiotrigger to do bChoppers=false, and voila --- it worked?!? I was shocked, surpriced, and stumbled. Then it struck me; even if I use bMyVariable to denote a boolean variable, how would the game engine know this? And all I had to do to make everything work the way it was supposed to, was to initialize variables so that their "type" would be correct. All bMyBool set to False as default, all iMyInteger set to 0, maybe even sMyString set to "empty" or whatever. You get the picture. Even if you check against TRUE, it might not trigger when you later decide to check against FALSE and it was never set to FALSE. Maybe it's a classic newbie mistake, I don't know. Just thought I would share my lesson Share this post Link to post Share on other sites