Home   Help Search Login Register  

Author Topic: waypoint woes.  (Read 1150 times)

0 Members and 3 Guests are viewing this topic.

Offline Cold

  • Members
  • *
  • Mission Maker
waypoint woes.
« 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.
A leader is best when people barely know he exists, when his work is done, his aim fulfilled, they will say: we did it ourselves. <br />Lao Tzu

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: waypoint woes.
« Reply #1 on: 18 Apr 2008, 17:02:20 »
Script way:
Code: [Select]
// [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";
};


Offline Cold

  • Members
  • *
  • Mission Maker
Re: waypoint woes.
« Reply #2 on: 18 Apr 2008, 19:42:03 »
 :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?
« Last Edit: 19 Apr 2008, 03:49:52 by Cold »
A leader is best when people barely know he exists, when his work is done, his aim fulfilled, they will say: we did it ourselves. <br />Lao Tzu