Announcement

Collapse
No announcement yet.

Trigger scripting question

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

  • 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



    Fate whispers to the warrior "You will not survive the storm."
    The warrior whispers back, "I AM the storm."

  • #2
    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, 12:41 AM.


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

    Comment

    Connect

    Collapse

    TeamSpeak 3 Server

    Collapse

    Advertisement

    Collapse

    Twitter Feed

    Collapse

    Working...
    X