OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Wildebeest 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..
-
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
-
Or you can use the engine eventhandler:
? 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).
-
yeah.. but it doesn't determin if you put the pedal down or not, right? Thanks anyways guys.. I'll go with your suggestions..
-
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).