OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: illmatic on 23 Apr 2004, 19:29:07

Title: Force aP engine off
Post by: illmatic on 23 Apr 2004, 19:29:07
aP is the player and im wanting to force his engine off and on.

aP action ["ENGINEON"]
~3
aP action ["ENGINEOFF"]
~3
aP action ["ENGINEON"]
~3
aP action ["ENGINEOFF"]
~3
aP action ["ENGINEON"]
~3
aP action ["ENGINEOFF"]

these commands dont force him too... any ideas  ??? :-X

if ur wondering why i want the engine on and off, its because of engine failure.
Title: Re:Force aP engine off
Post by: Planck on 23 Apr 2004, 21:15:00
Try:

aP action ["ENGINEON", vehicle aP]


Planck
Title: Re:Force aP engine off
Post by: myke13021 on 24 Apr 2004, 03:28:18
Quote
aP is the player and im wanting to force his engine off and on.

Not sure if you can use this command for Player controlled units.

try instead:

planename setfuel 0

and

planename setfuel 1

to simulate engine failure
Title: Re:Force aP engine off
Post by: Planck on 24 Apr 2004, 05:45:58
Hmmm........I should read the whole post properly.

I forgot aP was the player.


 ;D


Planck
Title: Re:Force aP engine off
Post by: illmatic on 24 Apr 2004, 12:27:32
:(, with the fuel method i already tried it, the engine doesnt turn back on once you refil the fuel.
Title: Re:Force aP engine off
Post by: Zombie on 24 Apr 2004, 12:49:18
I think engineon is a vehicle situation, not a unit, so try
vehicle player engineon true
vehicle player engineon false

or may require:
vehiclenameengineon true(and false)

I know, people are vehicles too but in this situation, vehicle actually does mean vehicle!

Title: Re:Force aP engine off
Post by: Planck on 24 Apr 2004, 13:19:09
vehicle player engineon true
vehicle player engineon false

This does work, however if the player presses forward the engine will not stay off

The engine will be switched off again once the player releases his forward key, provided he is still withih the trigger area.............I used a trigger to switch engine off and the player init field to switch it on at the beginning.

Maybe in combination with setfuel 0 this will work



Planck
Title: Re:Force aP engine off
Post by: illmatic on 24 Apr 2004, 13:47:02
ook guys thx, works