OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: Cold on 18 Apr 2008, 06:02:12
-
I have a mission where (at the end) the player joins an RACS squad of three men (not as the leader) and moves to their jeep, gets in as cargo and rides to their camp... the trouble is that once everyone is in the car I'm not sure how to send them on their way to the next marker since I'm using mainly scripting.... is there a way to make the driver [RACSCommandoldr] drive to the new marker [racscamp] only once the entire group is in the car by way of a trigger? If so what would be the syntax for that?
Thanks everyone. I searched the forums, but most of the search results were either way too complicated, or just not what I needed.
-
Script way:
// [my_car, [unit1, unit2, unit3]]execVM"thisscript.sqf"
// Car to be driven to a position
_car = _this select 0;
// Units that must be in the car
_units = _this select 1;
while { ((({_x in _car} count _units) != ({alive _x} count _units)) || isNull (driver car)) && (alive _car)} do
{
Sleep 1;
};
if (alive _car) then
{
driver _car doMove getMarkerPos "racscamp";
};
-
:scratch: Thanks Mandoble! I'll give that a shot when I get home tonight! /bow
edit. Alright, I'm having a tad bit of trouble. Once I place the [my_car, [unit1, unit2, unit3]]execVM"thisscript.sqf" modified of course with the unit and script names.. I get "Type Script, Expected Nothing"... but if I remove the "VM" from "execVM" it lets me "use" the script, but then of course won't accept the .sqf format... Any more ideas? Did I overlook something?