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

Possibilities of scripts to align ships on sets of axis(es?) based on cockpit position?

$
0
0
With the introduction of scripting, there seems to be quite a few possibilites for scripts to do things. Sadly, I'm not familiar with in-depth scripting, or the language in general.

What I was wondering, is, how hard would it be to force a ship to align on an X/Y/Z Axis, to effectively point a ship straight.

The use for this, at least in what I was hoping for, is to make 'straight' tunnels with mining ships. Since asteroid voxels all alight on an X/Y/Z axis of the world, if a mining ship...

Possibilities of scripts to align ships on sets of axis(es?) based on cockpit position?

Triggering timer blocks with wasd trough cockpit.

$
0
0
Has anyone written a script for this? This should apparently be possible with current api changes.
This would be very useful for all direction gravity drives.
I also suspect i am able to create a mech with basic fps controls if this script is available.

Times Chat messages

$
0
0
Hello there,

I want to send a Chat message to all players before my dedicated server restarts. Is this possible?

Can I send a Broadcast by a Programmable block?

Programmable Block TryRun kills script?

$
0
0
I feel like I may have missed a notice somewhere.
This script invariable returns as too complex...
Even stripped down to just the find a programmable block and use TryRun methods, it still is too complex, but if TryRun is removed it runs fine.
So... I guess "bool TryRun( string arg )" in IMyProgramableBlock is just a dead method now? 0.o
When did this happen?

Code:
IMyProgrammableBlock gB_Stat_Block;
public void Main( string arg ) {
    if( gB_Stat_Block == null ) {...
Programmable Block TryRun kills script?

Load blueprint into projector?

$
0
0
I can't seem to find any way to load a particular blueprint into a projector.. I can see all the manipulations to move one, but nothing to actually drop the blueprint in there to start with. Anyone know of a way to do it?

Any documentation?

$
0
0
Hello everyone,
I just got started with the programmable blocks in SE and I wanted to know if there's any documentation for the API, as I can't find any, just the wiki with some brief info.

Note:I have a somewhat decent understanding of C#.

GetOxygenLevel?

$
0
0
I see that GetOxygenLevel float was added to Air Vents and Oxygen Tanks. A quick look through the workshop and here and I can't find anyone putting it to use. I am a VERY novice coder and have no idea how to utilize this. I assume you can use this to find the percentage a tank is full and then display on a LCD. Well let me rephrase that can anyone post a code snip on here to show me how to use GetOxygenLevel to display on a LCD? This would go a long way to help me understand how to use...

GetOxygenLevel?

Reusable Utility Classes

$
0
0
I thought this forum might enjoy some reusable classes to make writing various types of scripts easier. I've included a short description of the most functionality included in each of files. Note: this post is intended for other script writers, not for end users.

Link:
https://github.com/bazilshep/InGame-Scriping-SpaceEngineers/tree/master/Scripts

Control.cs
PositionController - Uses a PID control loop to control the position of a ship CubeGrid.
AttitudeController - Uses...

Reusable Utility Classes

Changing rotor velocity by 0.5 via sensor/timer

$
0
0
Hello everyone.

I made an elevator with 6 rotors and light armor blocks. It works well enough except for one thing: when it reaches the top (or if I stop it anywhere midway) it shakes a bit too much.

I want it to slow down once it nears the top so I used two sensors and a timer to solve my problem. My settings:

Sensor Top owned by me is placed near the top floor and is set to detect friendly only and activates Timer Slow when present and Timer Fast when not present. (This works well)...

Changing rotor velocity by 0.5 via sensor/timer

Pulling Info from the HUD display...

$
0
0
Hi, Im trying my first attempt at a few scripts, and I was wondering if there is anyway to pull information from the hud display? You know the two boxs that hold the information for the character and the ship or station they are contoling via cockpit or contol station... would be handy to use this information as in a simular way to .DetailedInfo function....

Any idea would be warmly recieved.... '' )

Cheers.....

[Question] Emulating hardware and creating a virtual OS = feasible?

$
0
0
Hi, first time poster here.

I've done a search in the in-game programming for this topic but the best I could find was a state machine, which would be the first step I guess into what I want.

Link - http://forums.keenswh.com/threads/t...ful-state-machine-using-yield-return.7385411/

I'm wondering if anyone has took the time to design a generic 8/16bit processor within the programmable block? I've played about with this stuff before but never brought it to SE....

[Question] Emulating hardware and creating a virtual OS = feasible?

Getting Font type

$
0
0
Code:
IMyTextPanel panel = GridTerminalSystem.GetBlockWithName("panel") as IMyTextPanel;
            string selectedFont = panel.GetValue<string>("Font");
            Echo(selectedFont);
            panel.SetValue("Font", "Red");
A simple code I tried for checking the new fonts that DEV version has, I get exception that the property type is not string but MyTextPanel, which don't actually exist.
Trying IMyTextPanel also throw same error. :(

Can PB get list of signals from Antenna?

$
0
0
I am wanting to create a script counts/displays/logs signals around me. Is it possible to extract this data from the antenna block via the BP or can I only do this with a sensor or camera block (MyDetectedEntityInfo).

Programmable Block Inter-Grid Communication Guide

$
0
0
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, but we have to keep you on your toes now, don't we? ;-)

While you pick your collective jaws up from the floor, let's show some love for @Malware who helped design this system, and @Jimmacle for providing so much feedback that I ended up rewriting...

Programmable Block Inter-Grid Communication Guide

-

$
0
0
Old title: A little suggestion to community about Custom Data field: do not use it in exclusive way

All in title.
At least, if it possible.

Why: There is situations, there one block can be affected by multiple scripts. And all of them can want to read configuration from Custom Data.

Example:
Airvent in pressurised hangar. It can be used by 3 scripts:
- Hangar script
- Airlock script
- Ship status script

Possible solution:
Store configuration for your script in single line. Be...

-

Idea: Formations

$
0
0
Not to put this on a particular person but this might be a good one for Trevish and his revamped GPS+nav script.
It would also (probably) involve using coded message in beacons/antenna names.

I would like to be able to have my large ships fly in formation with the base ship when cruising/exploring. This is to avoid unnecessary docking and the troubles/risks associated with flying around with big things docked to eachother. Obviously you can only fly 1 ship at a time.

It could also be used...

Idea: Formations

[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.

Ship Printer Scripting.

$
0
0
Would anyone know if its possible to use the programmable block to detect the health/build state of all blocks on a grid? Or ideally a subgrid attached via a merge block. I want to be able to use a programmable block to advance my printer gantry only when all blocks on the grid currently being welded are complete.

I have zero coding ability myself so I would have to rely on someone else to actually write it for me, but it would make.

Cheers

Random

Is there no "IMyAirVent" ?

$
0
0
Hello,

in a script I need the oxgen value and ste the pressurisation on or off.

But there is no IMyAirVent Interface?

How can I access the Airvent to get Information and set some stuff?
IN Visual Studio I use:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using Sandbox.Common;
using Sandbox.Common.ObjectBuilders;
using Sandbox.Definitions;
using Sandbox.Engine;
using Sandbox.ModAPI.Ingame;
using...

Is there no "IMyAirVent" ?

Linq Wrapper

Viewing all 903 articles
Browse latest View live