Welcome to Tactical Gamer

+ Reply to Thread
Results 1 to 2 of 2
Discussion: ArmA - Development / ArmA - Mission Development - Trigger scripting question - Ok heres the plan I am using the Utes map for an invasion from the
  1. #1

    Charles Darwin's Avatar

    Join Date
    Sep 2008
    Posts
    595

    Trigger scripting question

    Ok heres the plan

    I am using the Utes map for an invasion from the LHD, I have added two boats to be used for insertion, well since theres no boat launch area on the LHD, i made a trigger to launch the boats, and a trigger area behind the LHD to recover the boats, placing them back in their original areas..

    now I have an idea for a script that would make this better but am unsure of the syntax and commands

    basically
    upon activation of the trigger via radio

    check to see if boat1 is in area, if yes, then boat1 setpos (in water); check to see if boat2 is in area, if yes, then boat2 setpos (in water)

    this way i can keep the radio commands to one, but activation wont set the boats clear across the map..ie they have to be on the deck of the ship in order for the script to put them in the water beside the ship



  2.  
  3. #2

    nthamma's Avatar

    Join Date
    Jul 2008
    Location
    Houston, Tx
    Age
    23
    Posts
    338

    Re: Trigger scripting question

    Code:
    private ["_boats", "_dispersion"];
    
    _boats = getMarkerPos "dockingArea" nearObjects ["RHIB", 100]; //* Assuming your boats are of class "RHIB" *//  Also requires you to create an empty marker where you want the docking area *//
    _dispersion = 0;
    for [{_i = 0}, {_i < count _boats && count _boats > 0}, {_i = _i+1}] do
    {
        _boats select _i setPosASL [getMarkerPos "launchArea" select 0, (getMarkerPos "launchArea" select 1) + _dispersion, getMarkerPos "launchArea" select 2]; //* Requires you to create an empty marker named "launchArea" wherever you want the boats to launch from *//
        _dispersion = _dispersion + 10;
        sleep 0.5;
    };
    if (true) exitWith {}; //* Exits the script *//
    Last edited by nthamma; 09-04-2009 at 01:41 AM.


    IN GAME ARMA: |TG-Irr| Lq.Snake


  4.  

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts


  
 

Back to top