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

User Interface in Programmable Block

$
0
0
Hi everyone, first time here (but long time player of Space Engineers).

I finally started tinkering with the programmable block, and I already created a couple of simple scriptsto get the hang of it (my best - and first - creation: an emergency airlock that closes all the doors in the ship when a room is depressurizing).

Now, I want to get to "the next level" and I was wondering: is it possible to render on a textScreen something else other than characters and asingle image? Specificallly,...

User Interface in Programmable Block

Find Pitch and Yaw to target

$
0
0
Hello.
i want to understand to know pitch and yaw for facing to target by gyro.
like how guidance missile work but i don't understand how it work.
please explain me how these math algorithm work ...

Thank you very much for helping. :D

//sorry my ENG is bad

Is it possible to create a block group?

$
0
0
Sadly my last copy of the old API documentation.chm got lost in a cleanup frenzy so can anyone tell me if it's possible to group a couple of IMyTerminalBlocks to a group and check if a group with some name exists?

On my miner the groups for wheels and thrusters regularly get deleted when merge/unmerge happens so I thought I'd write a script that just checks if a group with a certain name is there and if not, re-groups the blocks. The pilot seat toolbar holds the groups for wheels and...

Is it possible to create a block group?

Help Request: IMySlimBlock

$
0
0
I have an array of rocket launchers that I want to check the health of and if any of the blocks are damaged then to perform an action (like turning on the welders right behind them).

I managed to make it work using .IsFunctional. But that just gets me welding to the point where they are barely operational again. It also means that I have to wait until they are non-functional until they are welded.

Using the class IMySlimBlock I can check .IsFullIntegrity. But as a total amateur, I'm...

Help Request: IMySlimBlock

Programming with groups

$
0
0
Hey guys,

All of my scripts are broken.
What's the most recent syntax for programming with block groups?

for example, I would like to make a group of lights flash while a group of hangar doors are opening.

Any tips would be welcome!

Ideas on lagfree auto-mining and asteroid-finding

$
0
0
The last two weeks I have been working on an auto-miner and I have some ideas I would like to share. I succeeded in creating an autominer script that causes very little lag and can cause its ship to eat an asteroid completely. I don't have a docking script for it (yet) and only tested it in creative, but I stumbled on so many interesting things, I wanted to summarize and throw them on these forums. Sorry if any of this has already been mentioned.
...

Ideas on lagfree auto-mining and asteroid-finding

While we wait for sensor changes... Turret as sensor

$
0
0
This is my current wingman AI, which uses the LastEntity semi-cheat for sensor stuff, so I gotta merge the above into the below.


/*WingmanDrone with Fixed Weapon by Spiritplumber based on Sunoko*/

// ship needs: remote control named as below, sensor named as below, a forward facing gun OR a turret that can also face forward (can have more turrets), optionally a display.

// settings
int SafeDistanceEnemies = 40; // If closer than this to target, turn collision avoidance on....

While we wait for sensor changes... Turret as sensor

Ingame namespace and Projector RemainingBlocksPerType

$
0
0
Hi guys,

I have been playing with the programmable block for a month now and noticed some oddities. I hope you will be able to explain them to me.

TL;DR: should I, or should I not use .Ingame namespace and how to get the remaining blocks per type from the projector.

First of, I just read this article and removed the .Ingame namespace. This, however, caused some odd error, "ApplyAction" is not found. From...

Ingame namespace and Projector RemainingBlocksPerType

Block scripts requests thread

$
0
0
As programmable blocks came to SE, and not all players are programmers, I guess a thread with block requests is reasonable.

Basically, if you want a script on your block, post explanation here. Other programmers and I (Although I'm generally a busy person so maybe not often) will be more than happy to program it for you. Of course I still suggest you to learn programming, but you might not want to, and it's all fine. Other people like other things.
(Yes, I wanted to create website for that,...

Block scripts requests thread

Cryo occupied?

$
0
0
I'm unable to test this due to being away from a windows computer with the game installed on it for another week or so .. but I wonder if I can check if a cryo chamber is currently occupied with an in-game script?

A quick look at the source shows that the Cryo block is just an empty extension of IMyCockpit.
So would IsUnderControl work for this purpose?

[Beta] Space Engineers Workbench - A feature rich IDE for Space Engineers program development.

$
0
0
Hello all. My name is Tim and I'm a professional and hobbyist software developer. I had posted my original thread in the modding forum, but I think this forum may be more appropriate. For the last few weeks, I've been developing an IDE specifically tailored for writing Space Engineers programs. I've made a lot of progress in the last week and I feel like it is fairly stable and ready for a beta release.

I'm the only one developing it and it's in my spare time, so one thing I'm really...

[Beta] Space Engineers Workbench - A feature rich IDE for Space Engineers program development.

Script enviroment and deploy project for VS

$
0
0
I decided to publish my dev/test envitonment for SE scripts
It allows to:
  • Maintain separate files (no more 1-file mess)
  • Debug scripts in simple emulation outside of SE, currently it emulates grid with 3 blocks: TextPanel, Programmable Block (there script is started) and Battery.
  • Deploy script. It copies compilled and cleaned script into clipboard. You only need to go into SE and paste script in PB editor


Usage:
At first, you need to reinclude SE librarires,...

Script enviroment and deploy project for VS

Testing outside of the game - possible?

$
0
0
Visual Studio is great for writing in-game script, however for testing the script I need to run the game.
I was wondering if its possible to test scripts outside of the game, by testing I mean seeing more than just if it compile or not.
Is there a way then to simulate blocks and grids so I can find bugs without constantly switching between the game and VS?

Object Reference Not Set Error

$
0
0
Lately I have many problems with my OS script.
While finally I got the rendering part right with alot of help from @Georgik, right now the script
does not run at all.
As the title say that is the error I get.
With Echo command I managed to pinpoint the error to a subrutine called AddBootScreen().
It (should) be called once from the Initialize process and by updating a variable and usuing a menu key the
end result should be a moving progress bar on the LCD.
The LCD is...

Object Reference Not Set Error

Displaying output one char at a time?

$
0
0
Typing one char at a time from a string is nice and sci-fi-y.
Is it possible? Since we can't do any thread manipulation?

In psuedo:
Code:
IMyTextPanel tp = getBlockWithName("bla bla");
string myString = "I'm afraid I cannot do that Dave";

for each (char c in myString)
{
	tp.WritePublicText(c, true);
	sleep(0,2);
}
Not possible?

EDIT!
If possible, put a sound block next to the LCD and have it play a little click sound for each char, would add to the Alien style screen ^^

New Drone AI / Behaviors - Spill It

$
0
0
Can we get a running start on the drone behavior? Even if it's just a list of features or new methods... something to get our little tinkering imaginations working. Also, will this AI behavior be available only to Space Pirates or will it work player side as well.

Do tell.

Updated Guide?

$
0
0
hey guys,

finally i want learn some programming in SE. i know some fortran and did some microcontroller and SPS things...so i already know something about the logic behind.

i read several guide from 2015 and the code isnt working anymore due to the updates. are there any updated guides to learn about this IMy**** stuff except the one in forum from textor?

thx mac

Linq Wrapper

[wip] [MAJOR SETBACK] kScript; a flowchart based graphical programming interface for space engineers

$
0
0
kScript (the K stands for Keen) is a little project I have been working on for the past few weeks, which will hopefully make ingame programming much more accessible. Most of you already know that a huge part of the playerbase can't use the programmable block because they don't have the time, skill, or just absolutely refuse to learn c#. I think it sucks that such an awesome feature is unusable to most of SE's players, so I decided to write a tool to fix that. As the thread title implies,...

[wip] [MAJOR SETBACK] kScript; a flowchart based graphical programming interface for space engineers

Ingame Programming missing API and functions and known issues

$
0
0
So i've decided to sum up, what i'm mostly missing on blocks in ingame API
Please add things you want to see, or that should be here
Before i list missing APIs i add few known issue and possible circumvents

Some values are not available trough IMyTerminalBlock.GetProperties(), but you still can parse them from IMyTerminalBlock.DetailedInfo(which is enough, if you don't need to modify this values), list of detailed info strings can be found here...

Ingame Programming missing API and functions and known issues
Viewing all 903 articles
Browse latest View live