Home   Help Search Login Register  

Author Topic: Engine sound when trying to drive  (Read 537 times)

0 Members and 1 Guest are viewing this topic.

Offline Wildebeest

  • Contributing Member
  • **
  • The time the wildebeest ruled the Earth.
Engine sound when trying to drive
« on: 12 Mar 2005, 18:29:10 »
Hi!

Is there a way to determine wheter a guy is trying to drive a vehicle? I want a vehicle that is out of gas to make a start engine sound when you try to use it.

thx..
« Last Edit: 12 Mar 2005, 18:32:17 by Wildebeest »
Weeee...

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig
Re:Engine sound when trying to drive
« Reply #1 on: 12 Mar 2005, 18:47:19 »
well, a trigger:

condition must be:

           fuel car1 <=0.2 && bob in car1

Activation could then be a sound effect, either selected from the trigger's own list of sounds
(ye could create yer own addition to the list), or a playsound (pre-defined in the missions descr.ext file)  :-*

           car1 say "MySound"


later

« Last Edit: 12 Mar 2005, 18:47:42 by Tomb »

Kyle Sarnik

  • Guest
Re:Engine sound when trying to drive
« Reply #2 on: 12 Mar 2005, 19:06:06 »
Or you can use the engine eventhandler:

Code: [Select]
? fuel _car <= 0 : _car say "startup"
exit

should work similar to the bug with BAS's chopper startup sounds (where if you tried to start it up when it was out of fuel).
« Last Edit: 12 Mar 2005, 19:06:28 by Kyle Sarnik »

Offline Wildebeest

  • Contributing Member
  • **
  • The time the wildebeest ruled the Earth.
Re:Engine sound when trying to drive
« Reply #3 on: 12 Mar 2005, 19:28:09 »
yeah.. but it doesn't determin if you put the pedal down or not, right? Thanks anyways guys.. I'll go with your suggestions..
Weeee...

Kyle Sarnik

  • Guest
Re:Engine sound when trying to drive
« Reply #4 on: 12 Mar 2005, 21:56:53 »
yeah.. but it doesn't determin if you put the pedal down or not, right? Thanks anyways guys.. I'll go with your suggestions..

Yes, it does. Read again. Use an engine eventhandler:

this addeventhandler ["engine",{if (_this select 1) then {[_this select 0] exec "script.sqs"}}]

script.sqs will be the script I showed, plus the defination of _car which is = _this select 0  (_car = _this select 0).