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
So this is my problem:
I have the following customdata in the PB with TMC:
General block control
loading
Cruise control
Normal
Cruise
Camera switch
report:Camera-front
DisplayName=Camera-front;first:Camera-front:View
I am inside a grid with multiple cameras and I wanted to use TMC for viewing different cameras. So I tried first with a single camera called "[SomeGridPrefix] Camera-front", but the two lines at the end of the customdata are not working.
I thought first that view action for camera is not called as "View" actually. Then I tried to find out the correct name with report, but I could not find the log output on the PB screen.
The PB with TMC is a small grid version. It is currently showing "text and images" with the text "Tree Menu Command".
Check out both main screen and keyboard screen - I think I moved the log to the second one in latest version.
I found the log on the keyboard.
It makes sense. Of course, PBs cannot view any cameras XD
Then I will just use toolbar for switching camera.
I set it up but menu is displayed 180° and on keyboard script ask for LCD to write debug info.
Can i rotate menu?
Hmm.. Then i must use different type of ProgBlock from mods and use lcd as extra block.
Still... your script ask for extra LCD and halts if i use: Battery, Programing block, Remote block and Seat.
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=401530181
Got object reference is not instance of an object...
Maybe that the block has only one LCD?
That's likely the case. The script wants normal PB with keyboard because it writes log to it.
>Still... your script ask for extra LCD and halts if i use: Battery, Programing block, Remote block and Seat.
Can you be more specific? See the discussion OP, and make sure you followed the set up steps.
2. I setup your script with block group "PC" contain PB+RemoteBlock.
3. I hit recompile, the keyboard on PB change to debug saying =
"Add LCD or Cockpit to group so script can write to"
On PB main LCD render menu upsidedown while mouse is upwards.
Sorry for somewhat misleading message, I'll change it.
If you want to have controllable menu on this particular PB, you need to use either cockpit screen or dedicated LCD panel. I made it this way because using internal PB screen is bugged, as you already discovered. I'd love to make it work, but it is impossible to fix inside a script - we can't rotate text sprites, so I only hope keen would sort it out (hint: they won't).
LCD screens in Cockpits was not planned for SE but they were pushed to do that by somenone...
Can you make script work when PB has no screen?
This mod also throw "not instance of an object" error.
https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=1165062748
1. Find the line "surfaceForMenu = Me.GetSurface(0);" and comment it out like that:
"//surfaceForMenu = Me.GetSurface(0);"
2. Make sure you have "LCD Debug" screen on your grid for logging.
If you really determined to use screen-less PB for some reason with this script and don't want to add LCD panel, you can also comment out these lines:
l = (g.GetBlockWithName("LCD Debug") as IMyTextPanel) ?? me.GetSurface(1);
and
l.WriteText($"{T}: {s}\n", true);
This would bypass logging, but also make some important features unavailable.
1. My TMC setup is in essence a simple TMC PB and an industrial cocpit.
2. The script starts as normal and whrites to the pre-determined screen.
3. i changed the "MenuScreenIndex" to 3.
4. now it wont work and no matter what number i set MenuScreenIndex to the PB only outputs
0: Need something to write to. Add at least one LCD or cockpit to the main group.
i have tried to recompile multiple times, "re-whrite" the script to PB and even delete the PB entirely and replacing it but still nothing.
It is a creative singelplayer world with scripts on and i do have this script running on another build in the same world without issues.