Jump to content
Sign in to follow this  
thetrooper

Make vehicle undrivable

Recommended Posts

Hi everyone. I've got a quick question that's bugging me.

I've got a vehicle which the player is the driver, however I don't want the vehicle to be able to move until after an event.

The set fuel to 0 works fine, except unit says 'low on fuel' which kind of sounds a bit crappy.

An Idea I thought about is to somehow Whitchurch off the voices for that unit maybe?

Appreciate if someone could give me a steer. Thanks

Share this post


Link to post
Share on other sites

IMO OP wants player to be able get in vehicle, but just unable to move.

Maybe turn off some radio channels to prevent annoying reports.

Share this post


Link to post
Share on other sites

yeah that's what I was thinking. However, if you turn off radios, character still reports by voice. Was thinking about doing a unable simulation but allowing head movement, however a script provided for someone else doesn't work very well in a vehicle. It creates a bug.

Share this post


Link to post
Share on other sites

Another way

to stop it place in the vehicles init

 this addEventHandler ["Engine",  {(_this select 0) engineon false}];

to allow it to move

carname removeEventHandler ["engine",0]

Share this post


Link to post
Share on other sites

Actually I just found a bug where you can get the AI to take the car without the engine making a noise.

So if your using AI you need to use

 this addEventHandler ["Engine",  {(_this select 0) engineon false; (_this select 0) forcespeed 0];

carname removeEventHandler ["engine",0];carname forcespeed -1;

Edited by F2k Sel

Share this post


Link to post
Share on other sites
Actually I just found a bug where you can get the AI to take the car without the engine making a noise.

So if your using AI you need to use

 this addEventHandler ["Engine",  {(_this select 0) engineon false; (_this select 0) forcespeed 0];

carname removeEventHandler ["engine",0];carname forcespeed -1;

Roger, I'll give this a go!

I just had a look at the:

0 fadeRadio 0;

This is good so far, however, if I script my own voices, will it cancel those out as well? Also to turn back on I'm guessing its

1 fadeRadio 1;

?

Share this post


Link to post
Share on other sites

0 fadeRadio 1 - As the wiki says

Syntax: time fadeRadio volume

Parameters:

time: Number in seconds

volume: Number - radio volume range 0 to 1.

Maximum volume is 1. Default is 1.

You could do 10 fadeRadio 1 and that would slowly fade the sound back in over 10 seconds.

In any case, F2K - Sel's way is better =)

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  

×