Announcement

Collapse
No announcement yet.

Simple conditional end-game

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Simple conditional end-game

    Looking for a simple end trigger /script (thingie) that does the following


    If all the EI in the trigger area are dead

    - - Then Mission Success

    - - - - Else Mission Failure

    The trick is I want THAT to happen when the squad gets to the extract point where there is a SECOND trigger that makes the first one "Fire off".


    In practice - A team moves to an objective and eliminates all the EI in a town or in an area, they then move to the exfil point and as they enter the (2nd)trigger area they get "mission success" because they did in fact get all the EI (from the 1st trigger area) or "Mission Fail" if they left any of them and exited the area.

    I can make one that gives instant gratification as the last one is killed. I want one where they need to "clear through" their targets and make sure they have gotten them all. And only at the extract point will they get the indication on how they did.

    I have a second but I'm going to start another thread as it is a different (and I think in the end even easier) trigger type.

    Thanks team, no time to play but the Laptop works well enough to let me build stuff while sitting in hotel rooms.

    Solo

  • #2
    Re: Simple conditional end-game

    This is going to require just a little change in approach but is easily done. There are many ways to do this, but this is the one I use since we have very little conditions I'll use a public variable. Don't worry, it's easy.

    First create a trigger on the map and set the Axis A and the Axis B to be super small (ie. 2) and off the side of the map somewhere. It is going to fire as soon as the mission is started and create a public variable which we will use to store the status of your first condition (did they kill all the EI from the first combat area). If you have no independent units on the map I use "Independent" in the activation status in the trigger. Set it to only fire ONCE and when NOT PRESENT. The condition stays as THIS. In the ON ACT (on activation) you enter this...
    Code:
    missionStatus = "inProgress"; publicVariable "missionStatus";
    This just creates a variable called "missionStatus" and then sets it's value to a string "inProgress". inProgress is just anything I've made up...I choose this because it's descriptive of the fact the mission has just begun when the trigger fires. The publicVariable command just makes it so that when any connected client (player's computer) detects the area is void of any independent units the variable is created and then broadcast to all other clients. If another computer joins the game in progress all variables that have been broadcast as publicVariables are automatically updated on the JIPs to be the same value.

    Our next trigger is just like you said earlier gives you instant gratification except you don't make it end the mission but just do the following in your ON ACT:
    Code:
    missionStatus = "areaClear"; publicVariable "missionStatus";
    If you want to give the players an indication that they have cleared the area you can add a notification like a hint or something if you like. Sometimes you need to broadcast it to all computers and somethings will do so automatically. But since you said you don't want that I'm skipping that.

    Your last trigger is going to actually be two more triggers. Create a new trigger and if your players are Blufor then set the trigger to fire Activation: BLUFOR

    Set it to fire ONCE and when PRESENT. In the Condition field we are going to add a second condition. The word THIS just means that all the stuff you just set (fire trigger when Blufor is present within Axis A & B) must be true in order to fire the trigger. You can ommit the word THIS and have the trigger fire when a variable equals something like: missionStatus == "areaClear". This would do the same thing as your previous "instant gratification trigger". So our actual Condition will look like this:
    Code:
    this && missionStatus == "areaClear"
    In this one I usually trigger my effects like music and the center screen text that says "Mission Complete". I duplicate this whole trigger and delete the effects. In the Min, Mid & Max fields I change them all to wait 20 seconds and in Trigger Type choose "End1" and ON ACT I add:
    Code:
    forceEnd;
    just to make sure it forces the mission to end.
    Last edited by Unkl; 04-16-2015, 08:21 AM. Reason: remove unintended snarky-like word
    |TG-189th| Unkl
    ArmA 3 Game Officer
    Dean of Tactical Gamer University
    189th Infantry Brigade Member
    SUBMIT A RIBBON NOMINATION OR CONTACT AN ARMA ADMIN
    "We quickly advance in the opposite direction and take cover in a house on the SW side of town." - BadStache

    Comment


    • #3
      Re: Simple conditional end-game

      SCORE . . . it works . . . awesomeness

      Thanks Unkl

      Note - Thank you also to Yink for explaining what all this means (again) in "code for dummies" terms as well. - It was perfect Unkl, my brain just needed to assimilate all the "nature of code" that is going on.

      Cool stuff,

      :-)

      Comment


      • #4
        Re: Simple conditional end-game

        Just thought that the first trigger that sets missionStatus="inProgress" you could change the condition to be
        Code:
        this && isServer
        This would make sure that a client that connects later would not reset the variable after the first ao was clear of enemies.
        |TG-189th| Unkl
        ArmA 3 Game Officer
        Dean of Tactical Gamer University
        189th Infantry Brigade Member
        SUBMIT A RIBBON NOMINATION OR CONTACT AN ARMA ADMIN
        "We quickly advance in the opposite direction and take cover in a house on the SW side of town." - BadStache

        Comment

        Connect

        Collapse

        TeamSpeak 3 Server

        Collapse

        Advertisement

        Collapse

        Twitter Feed

        Collapse

        Working...
        X