Jump to content
Sign in to follow this  
frezinator

How to disable driver seat of CRRC boat???

Recommended Posts

How do you disable the driver seat of CRRC boat??? so players cant switch to driver seat but they can still eject out of the boat.

Share this post


Link to post
Share on other sites

Put the invisible man in the drivers seat. Disable his AI so he doesn't try to drive it anywhere.

classname InvisibleManW_EP1

Share this post


Link to post
Share on other sites
try lockDriver

it works but I can't eject out of the boat :/

---------- Post added at 23:26 ---------- Previous post was at 23:25 ----------

Put the invisible man in the drivers seat. Disable his AI so he doesn't try to drive it anywhere.

classname InvisibleManW_EP1

it doesn't work

Share this post


Link to post
Share on other sites

how about putting an actually driver in boat then in his init field use

this hideObject true

turning him invisible, then you can use disable AI move or whatever other stuff you may need for him as well.

Share this post


Link to post
Share on other sites
how about putting an actually driver in boat then in his init field use
this hideObject true

turning him invisible, then you can use disable AI move or whatever other stuff you may need for him as well.

no luck :/

Share this post


Link to post
Share on other sites

The boat must be unlocked if the passengers are to disembark the vehicle. To ensure that passengers can disembark, but cannot switch to the driver position explicitly define the vehicle as unlocked as well as having the driver position locked by putting in the init field of the CRRC:

this lock false; this lockdriver true;

Regards,

Sander

Share this post


Link to post
Share on other sites
The boat must be unlocked if the passengers are to disembark the vehicle. To ensure that passengers can disembark, but cannot switch to the driver position explicitly define the vehicle as unlocked as well as having the driver position locked by putting in the init field of the CRRC:

Regards,

Sander

didn't work.. I can eject but I can still switch to the driver seat :/ the driver seat won't lock..

---------- Post added at 09:00 ---------- Previous post was at 08:58 ----------

lock the entire boat and create a custom eject action?

How do you make a custom eject action?

Share this post


Link to post
Share on other sites

off the very top of my head

{_x addaction ["Eject", "eject.sqf"]} forEach crew vehiclename

"Eject" is what is shown in the action menu if you want a more fitting name for your action, and then you need to create an eject sqf - I'm utterly clueless with .sqf, but if we were to use the old, slightly defunct .sqs it might look like:

_Vehicle = _this select 0
_UnitToEject = _this select 1
_Action = _this select 2

_UnitToEject action ["eject", _vehicle]

_UnitToEject removeaction _action

exit

[EDIT]

can see that addaction has improved since ArmA when I last used it, so instead it might actually be better to use this in the boat's init field:

this addaction ["Eject", "eject.sqf", "", 1, false, true, "", "_this crew _target"]

as that is always attached to the vehicle, rather than my first example that attaches the action to the unit which is a bit clunky, and will only appear to those who are the crew of the vehicle, and not those standing outside it. Script would then update to:

_Vehicle = _this select 0
_UnitToEject = _this select 1

_UnitToEject action ["eject", _vehicle]

exit

maybe someone here may be kind enough to conver that to an sqf, if not then update eject.sqf to eject.sqs

Share this post


Link to post
Share on other sites
didn't work.. I can eject but I can still switch to the driver seat :/ the driver seat won't lock..

It works exactly as intended in my game running at default, which leads me to suspect that there are circumstances that you have failed to mention in your question, such as specifying addons and mods that alter the default behaviour of the game.

(1) In the editor place an empty CRRC, name it boat and put in the init: this lock false; this lockdriver true;

(2) Place a player character and put in the init field: this moveincargo boat;

(3) Place another character and put in the init field: this moveindriver boat;

(4) Press preview and try to change seats

Regards,

Sander

Share this post


Link to post
Share on other sites
It works exactly as intended in my game running at default, which leads me to suspect that there are circumstances that you have failed to mention in your question, such as specifying addons and mods that alter the default behaviour of the game.

(1) In the editor place an empty CRRC, name it boat and put in the init: this lock false; this lockdriver true;

(2) Place a player character and put in the init field: this moveincargo boat;

(3) Place another character and put in the init field: this moveindriver boat;

(4) Press preview and try to change seats

Regards,

Sander

My CRRC boat is not empty, there's a non-playable AI Driver in it. Im doing a boat insertion. I set a waypoint called "Getout" for my CRRC Ai drivers. So, when they reach the beach it will automatically eject the players. The problem is when we are halfway to our destination, when the enemies start shooting at us, the AI driver stops the boat or he get shot and get killed... then players are stuck in the boat because I set my CRRC boats to "locked", they can't eject out the boat.

The reason I set my CRRC boat's to locked, is because I don't want players to get in the driver seat.

Just to make it clear, im not using a empty Boat CRRC, I went to Blufor->Ships->CRRC.

The CRRC has already have AI driver in it, which I set him to nonplayable.

I hope you understand or it's clear enough to understand.

---------- Post added at 23:42 ---------- Previous post was at 23:29 ----------

off the very top of my head

{_x addaction ["Eject", "eject.sqf"]} forEach crew vehiclename

"Eject" is what is shown in the action menu if you want a more fitting name for your action, and then you need to create an eject sqf - I'm utterly clueless with .sqf, but if we were to use the old, slightly defunct .sqs it might look like:

_Vehicle = _this select 0
_UnitToEject = _this select 1
_Action = _this select 2

_UnitToEject action ["eject", _vehicle]

_UnitToEject removeaction _action

exit

[EDIT]

can see that addaction has improved since ArmA when I last used it, so instead it might actually be better to use this in the boat's init field:

this addaction ["Eject", "eject.sqf", "", 1, false, true, "", "_this crew _target"]

as that is always attached to the vehicle, rather than my first example that attaches the action to the unit which is a bit clunky, and will only appear to those who are the crew of the vehicle, and not those standing outside it. Script would then update to:

_Vehicle = _this select 0
_UnitToEject = _this select 1

_UnitToEject action ["eject", _vehicle]

exit

maybe someone here may be kind enough to conver that to an sqf, if not then update eject.sqf to eject.sqs

I tried all of them including changing sqf to sqs, it still won't work :(

---------- Post added at 23:43 ---------- Previous post was at 23:42 ----------

what happens if you lock it after you eject?

when I locked it, I can't still eject out the boat.

Share this post


Link to post
Share on other sites

One must always provide a full explanation of the situation if one expects to be provided with a solution. Do not assume anything except an occasional air of intelligence and provide all relevant details.

The solution is simple:

(1) In the editor place an empty CRRC, name it boat and put in the init: this lock true; this lockdriver true;

(2) Place a player character and put in the init field: this moveincargo boat;

(3) Place another character, name it boat_driver and put in the init field: this moveindriver boat;

(4) Place a Move waypoint just before the Get Out waypoint and on activation: boat lock false;

(5) Place a trigger and set in the condition field (!(alive boat_driver)) and in on activation field: boat lock false;

That way the boat gets unlocked either just before hitting the beach or when the driver gets kileld. Job jobbed.

Sander

Share this post


Link to post
Share on other sites
One must always provide a full explanation of the situation if one expects to be provided with a solution. Do not assume anything except an occasional air of intelligence and provide all relevant details.

The solution is simple:

(1) In the editor place an empty CRRC, name it boat and put in the init: this lock true; this lockdriver true;

(2) Place a player character and put in the init field: this moveincargo boat;

(3) Place another character, name it boat_driver and put in the init field: this moveindriver boat;

(4) Place a Move waypoint just before the Get Out waypoint and on activation: boat lock false;

(5) Place a trigger and set in the condition field (!(alive boat_driver)) and in on activation field: boat lock false;

That way the boat gets unlocked either just before hitting the beach or when the driver gets kileld. Job jobbed.

Sander

Thank you so much!!!!! it worked!!!! Im really sorry for not explaining the whole details in the beginning >.< I thought there was like an easy and quick solution, that's why I didn't really explained the whole details.

Thank you so much!!! I really appreaciated it!!! :)

Share this post


Link to post
Share on other sites
One must always provide a full explanation of the situation if one expects to be provided with a solution. Do not assume anything except an occasional air of intelligence and provide all relevant details.

The solution is simple:

(1) In the editor place an empty CRRC, name it boat and put in the init: this lock true; this lockdriver true;

(2) Place a player character and put in the init field: this moveincargo boat;

(3) Place another character, name it boat_driver and put in the init field: this moveindriver boat;

(4) Place a Move waypoint just before the Get Out waypoint and on activation: boat lock false;

(5) Place a trigger and set in the condition field (!(alive boat_driver)) and in on activation field: boat lock false;

That way the boat gets unlocked either just before hitting the beach or when the driver gets kileld. Job jobbed.

Sander

I found another problem.... when I played in dedicated server, everyone was on the water swimming, not in the boat... :( is there a way I can fix this? I think it has something to do with locality problems? I have no experience doings locals..

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  

×