-
09-03-2009, 09:28 PM #1
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


-
09-04-2009, 12:38 AM #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 at 01:41 AM.


IN GAME ARMA: |TG-Irr| Lq.Snake
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)



Reply With Quote

Bookmarks