Jump to content
Jan-H

(wheeled) Vehicle: Engine won't turn on & not drivable

Recommended Posts

Already for a long time I have an annoying issue, already before patch 1.03.  Perhaps one of you can relate to it and point me to a solution?

 

Phenomenon: Sometime the player vehicle (player not necassarily driver) or even a fully AI crewed vehicle will get stuck and stop moving. The engine is off and can't be turned on except for a blink of an eye. Seems link to CarX or Car type wheeled vehicles. It does not matter where, even on a clear road.

 

- Fuel is 1, damage=0, getAllHitPointsDamage (particularly "HitEngine") shows all intact,  vehicle getposATL is above ground.

- "vehicle EnginOn true" will turn on the engine for a fraction of a second, and return to off the next frame.

- I can see a greyed-out engine symbol below WHL in the Vehicle info tab of the GUI blink a couple times very quickly in white  before going grey again when giving the AI driver scripted domove/moveto orders though.

- Any Move-type order won't do. Currentcommand is "MOVE", unitready is false and stays. Dostop or alike and reissuing move orders won't do the trick.

- Simulation of the vehicle and crew is on. Disableing simulation and reenabling it wont help.
- All AI or player crew have "enableAI"ed all their states. disabling them and reenabling "all" or single ones like "path" or "move" won't help.

- Disembarking driver, effectivecommander or all crew and reembarking won't help.

- Embarking player as driver only won't help. I can run around the car, but once I get on the driver seat, the engine seems drowned.

- setting fuel to 0 and back up won't help

- setting hitpoints to damage 1 or back to 0 won't help

- limitspeed, forcespeed, addVehicle to group, disjoin from group... same

 

- I use ACE, RHS and lot of other own scripts, so I monitored scripts (sqf, fsm) and successively killed them or skipped those addons. No success either. The new ACE speedlimiter or or engine start funcs can't be either, not only because I saw the sources and no reason that could cause trouble, but because this problem existed before the latest ACE versions.

 

- One thing that makes me suspect it has nothing to do with scripting is: I can SAVE and LOAD the mission in the editor when this problem occurs,  and upon reloading the problem is gone! All scripts, vars etc. are being stored as well as I am to understand, so the same stats and funcs/scripts will be running after the reload again whereas the problem is gone.

 

I use a loop or perframe handler to catch this:

 _v Engineon true;
 sleep 0.01; 

if (! IsengineOn _v) then { here we go...}

 

I have tried a myriad of tricks to fix this, but they cost performance and it is really annoying. The best fixes seem to createvehicle a copy, delete the original, assign its orignal ID (vehicleVarName) to the copy, and transfer the crew and all stored setvariables over. Or to save and reload, unfortunately.

 

Has anyone of you had a similar issue? Any ideas?

 

Thanks!

Share this post


Link to post
Share on other sites

I had a similar thing some years ago. My vehicle was a tiny short time inside of water and therefore the engine was disabled.

I did spawn the vehicle at 0,0,0 and moved it elsewhere then.

After I changed spawning to  another location the issue was solved.

  • Like 1

Share this post


Link to post
Share on other sites
5 hours ago, sarogahtyp said:

I had a similar thing some years ago. My vehicle was a tiny short time inside of water and therefore the engine was disabled.

I did spawn the vehicle at 0,0,0 and moved it elsewhere then.

After I changed spawning to  another location the issue were solved.

Yes, I've had this too. The vehicle shows no damage, but is effectively broken and can't be repaired

Share this post


Link to post
Share on other sites

Yep, try to spawn it on another location or at least on [0,0,100] before teleport at the right place. So, not related on dev branch, imho.

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

×