Announcement

Collapse
No announcement yet.

Request. Forced eject script

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

  • Request. Forced eject script

    We have a vehicle truck1. This vehicle has four players in it. I would like to execute a trigger that forces all players to eject from the truck on activation.

    You would think this would be easy. Here is the kicker.

    How do I do it so that if AI is driving, Only player controlled units will be ejected and NOT the ai driver?

    Thanks in advance.

    Current ARMA Development Project: No Current Project

    "An infantryman needs a leader to be the standard against which he can judge all soldiers."

    Friend of |TG| Chief

  • #2
    Code:
    {
        if (isPlayer _x) then {
            doGetOut _x;
        };
    } forEach (crew truck1);
    -or-

    Code:
    {
        if (_x in playableUnits) then {
            doGetOut _x;
        };
    } forEach (crew truck1);
    if doGetOut doesnt work for players, moveOut will work but wont have a get-out animation.
    Yink | Vanilla Pilot | Killer of Stirling | CS GOD | Projects Team

    Comment


    • #3
      It works! If I use this command in a helo it forces the helo to land first. Is there a way to get everyone in a chopper to bail, except for the AI crew?

      Thanks!

      Current ARMA Development Project: No Current Project

      "An infantryman needs a leader to be the standard against which he can judge all soldiers."

      Friend of |TG| Chief

      Comment


      • #4
        this command doesnt work for a helo? it forces the helo to land but the AI gets out?
        Yink | Vanilla Pilot | Killer of Stirling | CS GOD | Projects Team

        Comment


        • #5
          You should be able to use the "Eject" action: https://community.bistudio.com/wiki/action
          Recommend you execute an "unassignvehicle" command afteward so the helicopter doesn't try to pick them up afterward, but that may not be necessary.
          The "Eject" action now says you'll get a parachute on ejection, so test to see if this ruins your loadout. If it does, use the BIS_fnc_saveInventory command prior to the eject, then wait until the unit is on the ground for a couple of seconds and try the BIS_fnc_loadInventory command to restore.

          Comment


          • #6
            eject does work for what he needs.
            Yink | Vanilla Pilot | Killer of Stirling | CS GOD | Projects Team

            Comment


            • #7
              Recommend you execute an "unassignvehicle" command afteward so the helicopter doesn't try to pick them up afterward, but that may not be necessary.
              necessary

              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

              Connect

              Collapse

              TeamSpeak 3 Server

              Collapse

              Advertisement

              Collapse

              Twitter Feed

              Collapse

              Working...
              X