Cruise Control
Cruise Control is not working for me or others.
Hi, @ArduousDev! Thank for open this issues.
The Cruise control function will be setEntityMaxSpeed at the current speed of vehicle. (This line)
I think your project may have some resources is trying to setEntityMaxSpeed.
Anyway, please give me more information to figure out what causes the problem.
- When you enable Cruise Control (Default
CAPSLOCKkey), is Cruise status icon active on HUD?
The HUD works fine. There is no other scripts I have a empty test server.
@ArduousDev Hi i just test on my own local server. it seem fine for me please provide more detail about your server setup.
The HUD works fine. There is no other scripts I have a empty test server.
I have no idea what is the causes.
Can you give me some screen record to see the problem?
Recording and follow this steps below to help me check it out.
- Drive the vehicle at a speed 40 M/H.
- Reduce the speed to 20 M/H and press the
CAPSLOCKkey to toggle cruise. - Continue driving for a few seconds and press
CAPSLOCKkey again to disable cruise.
https://streamable.com/nnomvd
https://streamable.com/nnomvd
Thank you!
I tried to analyze the problem from your video. But I still can't figure out the cause of this. Sorry. :(
I want more information.
- Is it all vehicles that have such a problem?
- Did you installed any mods on your game?
- Before use this script, did you use any script that have cruise controls?
Fresh server install, nothing but this script was running. Tried with and without OneSync still the same result. At this point i'll just have to make my own cruise control.
I tried to figure out the cause with my fresh server install too, but It's fine for me.
So I think the problem might be from vehData['cruiseSpd'] is 0 in this line.
https://github.com/Dyztiny-Project/DyzCarSystem/blob/da07be962e7c19fcfd0408f7917ab370091e0694/client/main.lua#L107
But it should not a problem by get the current speed from GetEntitySpeed(currVeh).
https://github.com/Dyztiny-Project/DyzCarSystem/blob/da07be962e7c19fcfd0408f7917ab370091e0694/client/main.lua#L82
I really have no idea about it. But if you can make your own cruise control. could you please contribute to this project too? ;-;
It's now setting the speed, however once I let go of the accelerator the speed drops.
i have new pull request i think it might help https://github.com/Dyztiny-Project/DyzCarSystem/pull/4
Cruise Control is now working. Excellent!
There are some bug report from forum about this feature of #4.
Thank you, Ken_Janelle_Jr
Okay so this is really buggy with the cruise control. While enabled, it doesn’t disabled if you slow down or wreck, it’ll keep going. If the car is badly damaged and cruise control is on the car will go crazy. There needs to be checks for this, I don’t know why these functions aren’t already in as that is how cruise control actually works in real life & for every other resource out there with cruise control.
Engine health isn’t working either but that is the least of my worries.
I'll open the issue again and try to fix it later when i'm free.