Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
It's easy to fix though: Comment out lines that mention "showPublicText" and remove the word "Public" from the line(s) with "WritePublicText", so it's just "WriteText" and it'll work again. Warnings on compilation will stay, and it's okay.
The script is old as a dynosaur, but it worked last time I checked.
Honestly, there is another wheeled vehicle control script somewhere in the workshop, that is more advanced then mine, but yeah, this one should work too.
@Blue Falcon:
Instructions from caption posted at "How do I" thread of this script discussions.
Make sure you have all necessary groups named properly. If script compiles and you see this exception - you're missing a group.
Just tested to make sure. Vanilla game. Stable branch. Loaded the script from workshop.
Everything working.
Several "unrechable code" warning on compilation, but as described below - it's totally okay.
Tested both core and advanced settings. Everything works.
Check your groups and LCDs names. NullRef most likely means that you don't have essential group created (or if you don't need it - disable it in settings inside the script)
Getting a nullreferenceexception when I recompile
Unreachable code should be just a warning. Still have to compile and run correctly. In theory.
upd: Just gave the code a quick look - all 3 lines are for debugging. Won't hurt if they are unreachable.
281,4
329,3
338,3
You can also modify the code a little to force your LCD to display the currently working Programmable block.
After the line 490:
text = "Vehicle status:\n\n"; <---- Orginal line
Add something like this:
text = text+"Active profile OFFROAD."; <---- For PB1
text = text+"Active profile ROAD."; <---- For PB2
Active profile will be displayed after the line "Vehicle status".
Usually, I only use 'parking' and 'slow' modes outside of terrain, cause if I'm driving over metal blocks it means I'm parking. In this case settings won't mean too much, due to low speed.
If you want to have full range of settings ready for roads and separate one for off-road, you can just add another program block with the script and with just different set of settings. Create a timer block that will toggle them on/off and add this timer to your quick panel.
E.g.:
- PB1 with offroad settings and PB2 for roads profile.
- PB1 is ON and PB2 is OFF by default.
- Have a timer that will run both scrips, and 'trigger now' itself.
- Have another timer that will toggle both ProgrammingBlocks On/Off. We'll call it ModeTimer
- Add 'TriggerNow' action of ModeTimer to your quick bar.
- Drive around till you get on a road. Trigger ModeTimer.
- Now PB1 will be OFF, and PB2 will be ON. You are getting all new profiles.
At lines 47 and 48 you can disable thrusters and LCD usage. Scrip will not look for them, and won't crush if you have none. I've never tested it without LCD, though, but it should work fine.
thanks i figured it out after doing what u said it still crashed but then i got thinking u said it was looking for something that was missing and i had no thrusters or text panels so i added those and all works fine now can tell already that this script is gonna get alot of use from me :)
I'm thinking about trying to alter the ride height and dampeners, maybe even the suspension strength of the rover using your script...problem is my rovers are all built for terrain...and I wanna be able to adjust then on the fly for roads. Got any suggestions?
Most likely - you have a typo in one of the group names. This sort of exception usually indicates that script is trying to operate an object that was never found.
Script have debug mode to help solving this kind of issues. Find the line 120 and change:
bool debug = false; <---- THIS
bool debug = true; <---- TO THIS
Save and compile and run the script again. You should see a lot more then just 'exception'. Steps shown before the exception will show you what was the last thing script was trying to do before it crush, probably it will be setting of a certain group.