Real slowdown when running the script
Hello awesome people, i'm currently trying to create a RGB light animation(by assigning random values to Color), but i'm experiencing a TERRIBLE performance issue, that when i enter the scene with the...
View ArticleWindTurbine?
Hello, I would like to access to all my wynd turbines and retrieve some info from it.It seems that the API does not expose any MyWyndTurbine or IMyWyndTurbine interface at the moment. Any tips related...
View ArticleIMyInventory.GetItems() Returning MyInventoryItem instead of IMyInventoryItem
I've got a few sections of code in a couple automatic drill miners, all of the code was written by a user called Pennywise, that use the GetItems method to perform different tasks. One section I've...
View ArticleHelp using new inter-grid communications
Can someone explain how the new inter-grid communication system works? The old method of using the "IMyRadioAntenna.TransmitMessage" doesn't seem to work anymore and I can't find any information about...
View ArticleLCD Font Size & number of lines of text
Has anyone done the work and willing to share how to calculate how many text lines an lcd will show based on current font setting? I've been scraping scripts to find how people do it but its either bad...
View ArticleProgrammable Block Inter-Grid Communication Guide
Oh yes, that's right. The single most requested feature for PB is now happening. Programmable blocks can now utilize the antenna system to send data to other grids. We said it was never gonna happen,...
View ArticleGravity aligning thrusters
Hello, I wanted to try and create a script that uses thrusters on rotors to rotate them to match gravity for a modular miner I was going to try and build. I was wondering if anyone here had tried a...
View ArticleExecution time . What is acceptable for a script that people may use on multi...
I only play solo( because i mostly play with scrips ) so i don't really know what happens on multi play servers. Im trying to keep execution times low with peaks only 10ms. Quite often 1ms or less....
View ArticleRecovering Signatures and Bookmarks from a radar
Hi everyone, Since scripts are clearly considered as an "experimental" feature and basically banished from 95% of servers of the game, is it possible to expect the possibility to retrieve radar...
View Articlebattery kW not working properly in a script
I'm currently writing a script for storing battery information. This is a rundown of what I'm doing: 1. I'm taking the power information received from all my batteries via .DetailedInfo and splitting...
View ArticleCode Optimization Tips and Tricks
Hello all, I'm looking for some tips on how to make scripts run as fast as possible. What's the best place to use the GetBlock methods? Is it possible to just get the blocks the first time the program...
View ArticleHow do you determine speed in a given direction?
I have a script and I would like to determine the speed of the ship in the forward direction of the ship only. Basically, if you where traveling 10m/s forward and you turned exactly 90 degrees I would...
View ArticleNew way to read inventory?
I got this error on test, in the EasyAPI code (which I had updated to handle currently live changes but that hasn't been pushed to github or the store). There is no argument that corresponds to the...
View ArticleRun the programming block when a condition is met
Hello, I was wondering if there is a way to initiate the programming block if a rotor was at a specific rotation, or do I simply have to time the it takes for the rotor to be in that position and then...
View ArticleCheck for multiplayer or single player via script?
Is it possible to tell in any way whether a script is ran in multiplayer or singleplayer environment?
View ArticleWhat type of data can be sent using the IGC.SendBroadcastMessage() function?
I want to send a bunch of different types of data in a single message but i dont want to make a string out of it. I tried to do this: Code: if (Laser.Status == MyLaserAntennaStatus.Connected) { object...
View ArticleHow do you get the GPS position of your character?
I've looked at the source code and tried to find working examples, but I just can't seem to get the position of my character. How do you make this code work? public override void...
View ArticleGet nearby ships from antenna
Hi guys, Pretty new to scripting in SE. I want to write a script that warns me if an enemy ship is nearby. After grinding duckduckgo for bits and pieces of documentation the best thing i found was:...
View ArticleHow to retrieve item name?
This was what I found on the internet: string myItemName = myItem.Content.SubtypeName.ToString() But that doesn't work, it fails with the an error: 'MyInventoryItem' does not contain a definition for...
View Articleerror script IMyInventory.getItems
Hi, I have the error of "IMyInventory.getItems" in my script for sorting Container. I have tried many things but I can not solve this problem. I put the codes below for those who want to look at it....
View Article