Home   Help Search Login Register  

Author Topic: How to lock driver's seat only? SOLVED  (Read 1285 times)

0 Members and 3 Guests are viewing this topic.

Offline NoMore

  • Members
  • *
  • Location: Denmark
How to lock driver's seat only? SOLVED
« on: 25 Jul 2009, 13:28:05 »
Ok, I'm making a rescue mission where the player is sitting in the Rescue Raft from FDFmod. He is sitting in the cargo and it is important that he cannot use the action "To driver's seat".
It is also important that he can get out of the raft and the get in the cargo again still without entering the driver's seat.

Is this possible?  ???
NoMore
« Last Edit: 26 Jul 2009, 09:32:20 by NoMore »
"He who stands with me shall be my brother." - Warhammer 40k: Dawn of War

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: How to lock driver's seat only?
« Reply #1 on: 25 Jul 2009, 13:53:32 »
Take a look at the Get In event handler. That combined with unAssignVehicle should do what you need.  :good:

Offline NoMore

  • Members
  • *
  • Location: Denmark
Re: How to lock driver's seat only?
« Reply #2 on: 25 Jul 2009, 14:53:03 »
I'm sorry but I'm not really good at scrips though I understand the basics.  :confused:
Can you please explain what you mean? I checked the Bohemia Interactive Wiki but still don't understand...

Thank you for such quick answer.  :)
NoMore
"He who stands with me shall be my brother." - Warhammer 40k: Dawn of War

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: How to lock driver's seat only?
« Reply #3 on: 25 Jul 2009, 16:29:31 »
See attached missionette.

Walter_E_Kurtz

  • Guest
Re: How to lock driver's seat only?
« Reply #4 on: 25 Jul 2009, 22:52:19 »
As long as no-one else has to get into the driver's seat ... (and even then it would be possible with some scripting) ...

Make sure the empty lifeboat is named, say hellosailor.

Then just place a GameLogic (side: Game Logic ---> Objects ---> GameLogic) and write in the init line:
Code: [Select]
this moveInDriver hellosailor

Game Logics - your invisible friends!

Offline haroon1992

  • Members
  • *
  • My life is hopeless...
Re: How to lock driver's seat only?
« Reply #5 on: 26 Jul 2009, 06:22:23 »
If you only want your player or the guy who is hurt not to enter as driver ,you will need a checking trigger.
Put these in the trigger.
Code: [Select]
axis a /b : 0
activation : Any body
Repeatedly
Not present
type : none
Condition :  nameofguy == driver nameofvehicle
On Activation :nameofguy action ["eject",nameofvehicle]

I think this one will work(it worked for me)
Everytime you (as player) entered the vehicle,then he will be pumped out from the seat.

If you want to use with AI,please do the following,
On the init line of the vehicle,type :
Code: [Select]
nameofguy assignascargo nameofvehicle
Remove the get in waypoint (if you have one) and place a "move" WP near the vehicle.
In the On Activation of the WP,type :
Code: [Select]
nameofguy ordergetin true
I think that solves your problem
Haroon1992..............
Very busy with life, business, and other stuff. Away from OFP for months. Not sure if I could get back onto it. :(

Offline NoMore

  • Members
  • *
  • Location: Denmark
Re: How to lock driver's seat only?
« Reply #6 on: 26 Jul 2009, 09:31:49 »
Thank you so much every one!
I think Walter's way is the easiest though. I didn't even know you could use game logics like that..
Must remember to look at a game logic tutorial some time.  ;)
NoMore
"He who stands with me shall be my brother." - Warhammer 40k: Dawn of War