Home   Help Search Login Register  

Author Topic: Crew to leave vehicle by trigger  (Read 1204 times)

0 Members and 1 Guest are viewing this topic.

Offline gambla

  • Members
  • *
Crew to leave vehicle by trigger
« on: 16 Oct 2008, 17:27:14 »
Hi,
i've a group of vehicles and like to have the crew disembark with a trigger. Any way to do this without waypoints ?

thank you very much ! :)


Offline Luke

  • Members
  • *
  • Thank God! The OFPEC Staff are here!
Re: Crew to leave vehicle by trigger
« Reply #1 on: 17 Oct 2008, 01:38:45 »
in an .sqf file try the following:

Code: (Exit.sqf) [Select]
_vehiicle = _this select 0;
_crew= crew _vehicle;
_pos= _vehicle modeltoworld [1,3,0];
{_x setpos _pos} foreach _crew;

Put Exit.sqf in the folder of your mission.

Call it in a trigger using:
Code: [Select]
[vehicle] execvm "exit.sqf";
replacing "vehicle" with the vehicle of your choosing.

Luke
Pesky Human!!
Wort Wort Wort.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Crew to leave vehicle by trigger
« Reply #2 on: 17 Oct 2008, 08:55:00 »
- create a trigger, the size you need it to be (make sure the whole group fits in it)
- in it's on act. field write:
Code: [Select]
{(group _x) leaveVehicle _x} forEach thislist- group the trigger with the group and set it to be activated by 'whole group'
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline gambla

  • Members
  • *
Re: Crew to leave vehicle by trigger
« Reply #3 on: 21 Oct 2008, 13:01:47 »
thanks guys, will try it asap :)