Announcement

Collapse
No announcement yet.

Fallujah TvT needed

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

  • Fallujah TvT needed

    Might I draw your attention to the following deadline:

    http://www.tacticalgamer.com/armed-a...ml#post1638407

    Ready, set.......GO
    |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

  • #2
    Re: Fallujah TvT needed

    I've got a start on an AAS mission. I've spread the 3 control points well over the city so that each assault should take some form of transport.

    The issues I worry about are
    1.) having JIP players sync the variables with the server for who is in control of each control point.
    2.) should there be some sort of assets that spawn in for transportation at a control point depending on who has control of it? (if so how to do?) I certainly want a resupply to be available somehow.
    |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: Fallujah TvT needed

      I just got a headache...I kid.
      1)
      if (isNull player) then { waitUntil {!isNull player}; };


      2)
      if obj1==1 then execVM "SpawnAssets.sqf"?

      Just a thought process...it needs refinement.

      But I'd rather see players doing the resupply without an instant spawn of assets.

      TGU Instructor TG Pathfinder

      Former TGU Dean Former ARMA Admin Former Irregulars Officer

      "Do not seek death. Death will find you. But seek the road which makes death a fulfillment." - Dag Hammarskjold

      Comment


      • #4
        Re: Fallujah TvT needed

        TvT i have idea but no idea how to code them. I will get there, but nothing working in time for the event...

        Comment


        • #5
          Re: Fallujah TvT needed

          Originally posted by LowSpeedHighDrag View Post
          1)
          if (isNull player) then { waitUntil {!isNull player}; };
          Can anyone help me understand what this does?
          |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


          • #6
            Re: Fallujah TvT needed

            I think it says if no player is present wait until player is present. It let makes arma wait to run the scripts for a JIP until they are actually exist in the game. Essentially its a bug work around. I might be wrong though.
            Last edited by tralicrifleman; 08-05-2011, 08:34 PM.

            Comment


            • #7
              Re: Fallujah TvT needed

              Code:
              if (isNull player) then {waitUntil {!isNull player};};

              Lets brake it down shall we.
              1. Syntax: if (condition) then {code}
                Result of the Code executed is returned as the result to this command (which may be Nothing}.
              2. Syntax: isNull obj
                Checks whether the tested item is Null.
                Which null type the item has to be equal to depends on the type of object tested
              3. Syntax: player
                Person controlled by player.
              4. Syntax: waitUntil condition
                Suspend execution of function or SQF based script until condition is satisfied.
              5. Syntax: Boolean = ! a
                Returns a negation of Boolean expression. That means true becomes false and vice versa.


              So if we translate it all it should be something like this:
              Code:
              if (isNull player) then      //if player is not existant aka loaded then
              {waitUntil                 //suspend execution of whatever is below the if until the condition below is met
              {!isNull player};            // and the condition here is: NOT null player
              };
              Easy!
              TGU courses: - 20/05/11 Jacezz

              Comment


              • #8
                Re: Fallujah TvT needed

                Thanks Rambo, that's good info for you to post. But darn it, I'm still left with my original question...how does that sync the values of the variables on a JIP client with those on the server?

                This seems to get the first problem solved, knowing if the client is JIP or not.
                Last edited by Unkl; 08-06-2011, 11:44 AM.
                |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


                • #9
                  Re: Fallujah TvT needed

                  That itself doesnt sync anything, all it does is stops executing lines that are in the mission file, so anything in the file anything in the briefing, until player is synced. The actual state of the game and variables that need to be synced is done through couple other ways.

                  1. publicVariable

                  2. fnc_globalExecute

                  This one I used in my TvT for couple things. For example:



                  in the init.sqf
                  Code:
                  [] execVM "rscripts\func_assessmentHandlerDomi.sqf";

                  in the scripts\func_assessmentHandlerDomi.sqf
                  Code:
                  if (!isServer) exitWith {};                              //only runs on server
                  bo = 0;
                  ro = 0;
                  tb = 0;
                  tr = 0;
                  bd = 0;
                  rd = 0;
                  bluforvic = 0;
                  redforvic = 0;
                  timer = 0;                                 //assigning some variables that I have in couple triggers
                  _supertimer = (paramsArray select 3);                              //check what is the time the players set for superiority in the parameters
                          
                  
                  while {tb < _supertimer and tr < _supertimer} do {
                      sleep 1;
                      switch(true) do { 
                          case (bo == 1 and ro == 0 and rd == 0): 
                          { 
                              sleep 1;
                              tb = tb + 2;
                              if ((tb mod 10) == 0) then
                                  {
                                      [-2, {bob globalChat format ["Almighty: ""BLUFOR Air Superiority for %1 seconds.""",_this];}, tb] call CBA_fnc_globalExecute;
                                      bd = 1;
                                  };
                          }; 
                          case (bo == 0 and ro == 1 and bd == 0): 
                          { 
                              sleep 1;
                              tr = tr + 2;
                              if ((tr mod 10) == 0) then
                                  {
                                      [-2, {bob globalChat format ["Almighty: ""REDFOR Air Superiority for %1 seconds.""",_this];}, tr] call CBA_fnc_globalExecute;
                                      rd = 1;
                                  };
                          }; 
                          case (bo == 0 and bd == 1): 
                          { 
                              tb = 0;
                              [-2, {bob globalChat "Almighty: ""BLUFOR lost Air Superiority."""}] call CBA_fnc_globalExecute;
                              bd = 0;
                              
                          }; 
                          case (ro == 0 and rd == 1): 
                          { 
                              tr = 0;
                              [-2, {bob globalChat "Almighty: ""REDFOR lost Air Superiority."""}] call CBA_fnc_globalExecute;
                              rd = 0;
                          }; 
                      };  
                  };    
                  
                  waitUntil {timer == 0};                      // this is just a check for another win condition kicking in before this one, if game is not over then proceed
                  
                  _winner = "";
                  switch(true) do { 
                      case (tb == _supertimer):                    //figure out who won by superiority
                      { 
                          _winner = "BluFor Victory by Air Superiority";
                          bluforvic = 1;
                      };
                      case (tr == _supertimer): 
                      { 
                          _winner = "RedFor Victory by Air Superiority";
                          redforvic = 1;
                      };
                  }; 
                  
                  _reason = "Air Superiority";                          
                    
                  [-2, {_this  execVM "rscripts\EndStats.sqf"},[_winner,o,b,_reason,bpname,bpcost,rpname,rpcost]] call CBA_fnc_globalExecute;                               // // send all required information to clients to run in the endstats.sqf


                  EndStats.sqf being run on clients
                  Code:
                  _winnerf = _this select 0;                          //get the data from cba global execute
                  _numo = _this select 1;                                 
                  _numb = _this select 2;
                  _reason = _this select 3;
                  _bpname = _this select 4;
                  _bpcost = _this select 5;
                  _rpname = _this select 6;
                  _rpcost = _this select 7;
                  
                  
                  _text = format [
                  "Mission End - %1
                  \n%2
                  \n
                  \n**** BluFor ****
                  \nPlanes Lost: %3 x %5  =  %6 millon US dollars
                  \n
                  \n**** RedFor ****
                  \nPlanes Lost: %4 x %7  =  %8 millon US dollars
                  ", _reason, _winnerf, _numb, _numo, _bpname, (_numb * _bpcost), _rpname, (_numo * _rpcost)];                                           //conjure the mystical text
                  
                  titleText [_text, "BLACK"];                                  //display the text using titleText command which is LOCAL!!!!
                  _vehicleplayer = vehicle player;
                  removeAllWeapons player; 
                  player setPosATL (getMarkerPos "end_marker");                                                   //teleport my player so he can smack talk other players while looking at the end screen
                  
                  if ((_vehicleplayer) != player) then
                  {
                      sleep 1;
                      deleteVehicle _vehicleplayer;
                  };
                  
                  player enableSimulation false;
                  sleep 15;
                  endMission "LOSER";
                  [/quote]
                  TGU courses: - 20/05/11 Jacezz

                  Comment

                  Connect

                  Collapse

                  TeamSpeak 3 Server

                  Collapse

                  Advertisement

                  Collapse

                  Twitter Feed

                  Collapse

                  Working...
                  X