Jump to content
Sign in to follow this  
DecimusAquila

Problem with not allowing player to drive

Recommended Posts

Salute,

I have come to a stop about player not driving or flying in the driver's seat. In SP mode, this works, but in MP mode, the choice of a player driving any vehicle is still shown when player is in cargo.

What can I do not to allow any player drive any vehicle when inside it? I just want player to seat in cargo only and no choice of player choosing "sit in driver's seat".

Thanks.

Share this post


Link to post
Share on other sites

Create a trigger somewhere like this:

COND:  !isNull driver heli1

ON ACT:   if (typeOf driver heli1 != "SoldierWSniper") then {driver heli1 action ["Eject",heli1]}

The above assumes:

1. The chopper/vehicle in question is called HELI1

2. The ONLY person you want to be able to fly/drive is a sniper, note the person type of "SoldierWSniper"

Share this post


Link to post
Share on other sites

Alright, I tried it and it works great, though it works only when you try to enter the driver's at first. I will explain to make it clearer;

My situation is a bit different. The AI drives the car to my position, then I enter the car into cargo whilst the AI driver is still in drivers seat. You will still be able to choose "enter drivers seat" starting of from cargo.

If I getout whilst in driver's seat after replacing AI driver from cargo, and try to getin back to driver's seat, only then will the trigger trigger.

Any ideas?

Share this post


Link to post
Share on other sites

If I understand you correctly:

If you get into driver position from OUTSIDE the car (ie, standing by it), then the trigger WORKS.

If you get into the driver position by going into cargo first, then choosing to "move over" to the driver's seat, the trigger does NOT WORK.

Interesting. Have you made sure the trigger is "repeatively"?

Share this post


Link to post
Share on other sites

Yes, I made it repeatively and true, your question to understanding my last post is exactly what I meant. Troubling issue this is.

Share this post


Link to post
Share on other sites

It doesn`t work, because when you are changing seats inside, driver slot won`t become null, so isNull condition won`t notice it. If you want to get it work with this system (only sniper can drive) you have to make trigger with

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">CONDITION: (!isNull driver car1) && ((typeOf driver car1)!="SoldierWSniper")

ON ACTIVATION: driver car1 action ["eject",car1]

Share this post


Link to post
Share on other sites

Thankyou Bobor SK,

Was just about to write it too smile_o.gif. this code you just edited was the right one to work. smile_o.gif

Although another question came up concerning this matter. Since this will be a multi player mission, and say a guest comes into your server and he does not know that if he enters the Driver's seat, he will eject while the AI is doing the driving already with him inside, that could be a disaster for that player esspecially if the distance to objective is far  biggrin_o.gif . What other command can I add appart from "EJECT" so that it will still put the player/guest inside the car still in cargo and not eject him.

I have checked in wiki already for a command close to this, but none.

If no answers to this, no problem at all. Thankyou Bobor SK and satexas69 once more. thumbs-up.gif

Share this post


Link to post
Share on other sites

Decimus: I just use the "hint" command at start of mission to remind people that only pilots can fly.. etc etc.

There are various ways you can use the "hint" command to do what you need to do, tactfully.

Share this post


Link to post
Share on other sites
Decimus: I just use the "hint" command at start of mission to remind people that only pilots can fly.. etc etc.

There are various ways you can use the "hint" command to do what you need to do, tactfully.

lol, true satexas69, that was what I did exactly or a hintc for it to pause. Thanks alot satexas69 for your help. Thumbs up.

Share this post


Link to post
Share on other sites
What other command can I add appart from "EJECT" so that it will still put the player/guest inside the car still in cargo and not eject him.

Open the Biki Scripting Commands List and search for moveInCargo and emptyPositions. Now try to make your trigger yourself. wink_o.gif

Share this post


Link to post
Share on other sites
What other command can I add appart from "EJECT" so that it will still put the player/guest inside the car still in cargo and not eject him.

Open the Biki Scripting Commands List and search for moveInCargo and emptyPositions. Now try to make your trigger yourself. wink_o.gif

ahhh, I catch your drift Bobor SK. That can very well work esspecially if aided with condition. I will try them out, also a couple of ideas i have in mind. Great help guys. If i though do get stuck in a rough situation on this issue, I will write on it.

Thankyou.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×