Home   Help Search Login Register  

Author Topic: How can i force the player to stay in/get out the vechile  (Read 1421 times)

0 Members and 1 Guest are viewing this topic.

Offline tateyou

  • Members
  • *
As topic, if i want to define an ambush, but before the ambush happened, i don't want the players to get out the car(AI driving) freely, and when the ambush take place, everyplayer should be forced to get out of the car immediately without orders.
How can i make that happpen? What scripts or syntax should i use?
THX a lot!
« Last Edit: 12 Jun 2008, 19:00:19 by tateyou »

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: How can i force the player to stay in/get out the vechile
« Reply #1 on: 12 Jun 2008, 21:34:35 »
myVehicle Lock TRUE;

myVehicle Lock FALSE;
{unassignVehicle _x; _x action ["EJECT"];} forEach units myGroup;
« Last Edit: 12 Jun 2008, 21:37:31 by Mr.Peanut »
urp!

Offline tateyou

  • Members
  • *
Re: How can i force the player to stay in/get out the vechile
« Reply #2 on: 13 Jun 2008, 02:22:40 »
Thank you!
There is a little more, {unassignVehicle _x; _x action ["EJECT"];} forEach units myGroup;
where should i use it? Can i type this syntax in the ON.ACT of a trigger or in scirpts?
What does myGroup indicate? The group name?
Here's the deal, i defined a trigger with certain area, Activation Blufor present, and 4 playable unit get in a car and drive torward the trigger area, what should i do to pop out all the playable units when entered the trigger area?
« Last Edit: 13 Jun 2008, 02:43:53 by tateyou »

Offline Carroll

  • Members
  • *
  • Mission Designer (MP-"well tryin to capiche"
Re: How can i force the player to stay in/get out the vechile
« Reply #3 on: 13 Jun 2008, 10:04:12 »
to get the group to get out once in the trig use Mr Peanuts suggestion in the triggers ON ACT;
Code: [Select]
{unassignVehicle _x; _x action ["EJECT"];} forEach units myGroup;
&& yes myGroup == the groups name

Offline Mr.Peanut

  • Former Staff
  • ****
  • urp!
Re: How can i force the player to stay in/get out the vechile
« Reply #4 on: 13 Jun 2008, 14:18:59 »
And put the myVehicle Lock TRUE; in your init.sqf if they are starting the mission in the vehicle. Do not bother with the myVehicle Lock False; if you do not want them to be able to get back in the vehicle.
« Last Edit: 13 Jun 2008, 14:20:53 by Mr.Peanut »
urp!

Offline Rommel92

  • Members
  • *
Re: How can i force the player to stay in/get out the vechile
« Reply #5 on: 19 Jun 2008, 05:36:20 »
I just feel sorry for the guy who was using this, probably thinking it was his fault. But I think you may have forgotten:
original:
Code: [Select]
{unassignVehicle _x; _x action ["EJECT"];}

fixed:
Code: [Select]
{unassignVehicle _x; _x action ["EJECT", vehicle _x];}

Got me confuzzled for a second there... last time using ur code peanut! Third time haha. (jkin gw mate).

EDIT:

In any case, I've used a GET IN NEAREST waypoint to move a group into a vehicle, after using this command they will simple re-enter the vehicle. Any idea?
« Last Edit: 19 Jun 2008, 05:48:08 by Rommel92 »