Home   Help Search Login Register  

Author Topic: Detection when in a car.  (Read 347 times)

0 Members and 1 Guest are viewing this topic.

Offline Tim Pink

  • ECP Team &
  • Former Staff
  • ****
  • "Down with a bang and that'll be the end"
Detection when in a car.
« on: 20 Apr 2004, 00:53:52 »
Hey Guys i have a rather simple question here.

Im making a mission where you go undercover on Tonal and eventually end up fighting alongside the Rebels but im having trouble with a certain little bit.

At the begining of the mission you start at a port and i have a car which is suppossed to come and pick you up.
I placed a car, put a civilian in it(Moveindriver) and gave him a move and getout waypoint when he reaches you.

Now heres my problem, i need to make the man get out and wait for you to get into the car and then get back in and drive you to the town.

How do i do this and also how do i make it that the player can only ride in back?

Thanks Heaps

Tim
"Whoever said nothing is impossible, never tried slamming a revolving door."

toadeater

  • Guest
Re:Detection when in a car.
« Reply #1 on: 20 Apr 2004, 05:15:10 »
Something like this should work:

After the get out waypoint, make a get in waypoint close by and set it's condition to "incar" or whatever name you want. Have the get out waypoint run this script:

@player IN vehicle
man assignasdriver vehicle
incar=true

AFAIK you can also use an action to get the guy in and out of the vehicle like this:

man unassignasdriver vehicle
man leave vehicle
@player in vehicle
man assignasdriver vehicle
man action ["get in",vehicle]
@man in vehicle
incar=true

This way you don't have to use get in and out waypoints, just run one script to do it all.  Just make sure the next waypoint's condition is still "incar" or else as soon as he gets out of the car he'll start walking to the next waypoint.


« Last Edit: 20 Apr 2004, 05:18:04 by Toadeater »

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Detection when in a car.
« Reply #2 on: 20 Apr 2004, 12:30:06 »
You can do it using a few waypoint conditions and a trigger to kick the player out of the driver's seat if they get in..

Kind of like this example mission on the desert island (see attachment) ;)