Jump to content

Ariovistus

Pre Member
  • Content Count

    2
  • Joined

  • Last visited

  • Medals

Posts posted by Ariovistus


  1. One possible way could be: Only the Ais will be teleported inside the vehicle, Players not included.

     

    1) Make a trigger using Ellipse (not rectangle) with same X radius and Y radius. (ex: 20 meters)

    2) Repeatable and Present

    3) Activation: Anybody (or whatever you need)

    4.1)  Condition (not players included):  (!(player in thislist)) && ("Man" countType thislist > 0)

    4.2)  Condition 2 if you want whoever to be teleported:  THIS && ("Man" countType thislist > 0)

    5) On Act:  _dump = [(thislist select 0), ThisTrigger] execVM "Heli.sqf";

    6) Call the vehicle "HELICOPTER", or change its name in script.

    7) Make the units move in the trigger.

     

    Heli.sqf:

    private ["_unit", "_area", "_areaSize", "_rArea", "_nearestUnits"];
    
    _unit = _this select 0;
    _area = _this select 1;
    
    _areaSize = triggerArea _Area;
    _rArea = _areaSize select 0;  // 20 meters
    
    _nearestUnits = nearestObjects [position _area, ["Man"], _rArea];
    
    
    {
    	_x moveInCargo HELICOPTER;  // Change name HELICOPTER if you need
    	Hint format ["Soldier %1 aboard the Helicopter!", name _x];
    				
    } forEach _nearestUnits;
    

    Check if it fits you.

     

     

    Works like a charm, you're a wizard! Thanks man!


  2. 
    
    waitUntil {!isNull player};
    if (local player) then 
    {
    //Player ID Array
    _Players = [Mark];
    if !(getPlayerUID player in _Players) then
    {
    player moveInCargo spawnHeli;
    sleep 0.5;
    };
    };
     
    waitUntil {!isNull object};
    if (local object) then 
    {
    _aiPlayers = [bob, Carl, Luke];
    if !(getObjectType object in _aiPlayers) then
    {
    object moveInCargo spawnHeli;
    sleep 0.5;
    };
    };

     

    Thanks for the script :)

    I'm new to scripting but I am trying to use your script to move my ai players into my heli upon respawn on the trigger too. the intent here is that as my teammates die they respawn on the trigger which then sends them into the heli. It works now for my players but how can I make it work for ai units(/objects?) too? as of right now they respawn on the trigger but remain on the ground.

×