Quantcast
Channel: Programming (In-game)
Browsing all 903 articles
Browse latest View live

Timer block 1-in, 81-out operations- coding a neural network?

I was defending the honor of a timer block in another thread, noting how 81 operations per second didnt seem that bad after all.. and it got me thinking. ... is it possible, to someone with the know...

View Article


Inter-Grid Communication Only Works on the Same Grid

Hi all, Recently got into scripting for SE and I've been trying to get igc working between two different grids with antennas but I've been unsuccessful. I've been using the example scripts provided by...

View Article


How do I know whether a light bulb is turned On or Off?

How do I know whether a light bulb is turned On or Off? Example LCD: [Lamp] - Off. -------------------------------------------------- ------------------------ code: IMyTextPanel LCD =...

View Article

System.Text.RegularExpressions performance in scripts

I profiled my freezing script and found that ~400 Regex.IsMatch executions on compiled regexp last 0.2 seconds! On my local machine in pure C# the exact same regexps(even heavier) executing 200(!)...

View Article

Script freezes game

Are ingame scripts running in main thread? I made a sorter for my storage. Every time it works, game freezes on ~0.5 second =( It freezes even i transfer one stack.

View Article


Can you list the raw materials required to build a MyProductionItem?

I'm hoping there is a way accessible through the API to get this. For example, making a steel plate requires 7 iron. I've started to hardcode each item, which isn't too bad since there's only 26, but...

View Article

Some warning before script too complex

May I know in script about how i close to "Script is too complex" error? My script may vary count of iterations it does. So, maybe there is a way to know about reaching limit without stopping PB?

View Article

Image may be NSFW.
Clik here to view.

Jukebox block

Hello. A new Jukebox has a playlist. It's possible to manage it?

View Article


Help with controlling groups

So I'm wanting to write up a script that sums up all thrust directions. compares the available newton force with current ship weight. Then uses the delta-v formula and determines if the ship had enough...

View Article


Question about continuous looping in PB

so I've just gotten into playing with the PB in game and was wondering how to make a script continuously loop basically I'm trying to make it so refineries cant be turned off and if they are, to then...

View Article

Object reference not set to an instance of an object

using System; using System.Text; using System.Collections; using System.Collections.Generic; using VRageMath; using VRage.Game; using Sandbox.ModAPI.Interfaces; using Sandbox.ModAPI.Ingame; using...

View Article

Programmable Block Inter-Grid Communication Guide

This API is now obsolete. Use new interface documented here: https://github.com/InflexCZE/IGC_ShowCase/tree/master/IGC_ShowCase...

View Article

Detecting where a program run was called from.

Is it possible to know where a programmable block was called from in the script? So in this case I have a sensor named "assignment A" and it calls the pb with the argument "OpenDoor" a generic call for...

View Article


What this interface of the Hinge blocks for programming (In game)?

What this interface/type of the Hinge blocks in the sparks of the future dlc for programming (In game)? Example: IMyBlockGroup group = GridTerminalSystem.GetBlockGroupWithName("A Group");...

View Article

Analysing conveyer system for hydrogen/oxygen

Hi, I need help finding the right way to analyse the conveyer system of a grid with a script. For the most block types this is not problem. You can select the inventory of the block an check with...

View Article


Image may be NSFW.
Clik here to view.

Help my script :)

Hi, I’m just learning to program in the game, and I have not encountered such a level. The creak shows the fullness of the container on the screen. Containers should be named BOX_0, BOX_1, etc. The...

View Article

Ignore max script length

Is there a way to remove or ignore the max size of scripts? It would be very helpful, for debugging and testing.

View Article


Check If Welder Is Welding?

I am wondering is there a way to check if a welder is currently welding? I have tried IsWorking but that always come back true even if it is idle.

View Article

Change A Block's Paint Color Via Code?

I'm fairly sure you can but is it possible to change the color/paint scheme of a block via the programming block? It would be a nice feature in any case.

View Article

Sci-Fi Four Button Panel LCD

Hi. I've searched for nearly an hour trying to find how to write text to the LCD panel on a button on the Sci-Fi Four Button Panel. I can't find how to do it in a script. The LCD panels are great for...

View Article
Browsing all 903 articles
Browse latest View live