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

Remote control gps script

$
0
0
I write a lot of python scripts for se, generating flight paths and things like that, however in game scripting has eluded me so far, I was wondering if anyone wouldnt mind providing a script that just loads a list of coordinates into a remote control for auto-piloting, for instance dropping space deliminated list of x y z coords into say custom data or a text panel that loads it into the remote control so that i dont need to have 100+ gps coords in my gps menu sort of thing. This script...

Remote control gps script

LF Speed Script

$
0
0
Hello together,

i´m playing on a server with a increased speedlimit of 500 m/s.
When i getting faster than 150 m/s and i fire some rockets, may ship get instantly rekt.
It seems that the shipspeed wasnt added to the speed of the rockets.

So i´m looking for a script/programm code that disable my rocket launcher at the speed of 150 m/s and acivates the rocket launcher, when the speed drops under 150 m/s.

I´ve no experience in programming/coding, so it will be nice to get some support for...

LF Speed Script

IMyInventory.CanItemsBeAdded usage

$
0
0
Some time have passed since last question about it so I wonder if today exists any possibility to use a method IMyInventory.CanItemsBeAdded and how to do that. This metod requires an argument of type "VRage.ObjectBuilders.SerializableDefinitionId" which can be build from a string and another argument of type "VRage.ObjectBuilders.MyObjectBuilderType".
It seems that a type SerializableDefinitionId is permitted in ingame scripts, but MyObjectBuilderType is not. Is there any way to obtain...

IMyInventory.CanItemsBeAdded usage

[Solved] Rare exception when compiling code.

$
0
0
Whenever i try to make this:
Code:
List<IMyTerminalBlock> ListName = new List<IMyTerminalBlock>();
GridTerminalSystem.GetBlockGroupWithName("Group of blocks to get").GetBlocks(ListName);
That gets all the items in a certain group and puts them into a list. I get an execution exception that displays the following: Object reference not set to an instance of an object.

I know this error is common in C# when you put:
Code:
List<var> ListName;
instead of
Code:
List<var>...
[Solved] Rare exception when compiling code.

[Solved] IMyInventory.CanItemsBeAdded usage

$
0
0
Some time have passed since last question about it so I wonder if today exists any possibility to use a method IMyInventory.CanItemsBeAdded and how to do that. This metod requires an argument of type "VRage.ObjectBuilders.SerializableDefinitionId" which can be build from a string and another argument of type "VRage.ObjectBuilders.MyObjectBuilderType".
It seems that a type SerializableDefinitionId is permitted in ingame scripts, but MyObjectBuilderType is not. Is there any way to obtain...

[Solved] IMyInventory.CanItemsBeAdded usage

Costum sound in scripts

$
0
0
Hello, I have a game script,where I want to add costum sounds can anyone help me?


//red alert
alertArgs[1] = "red";
alertNames[1] = "Red alert";
lightColor[1] = new Color(255, 50, 50);
blinkInterval[1] = 2f;
blinkLength[1] = 50f;
closeBlastDoors[1] = 1;
soundName[1] = "SoundBlockAlert2";

I dont know how to

File: SpaceEngineers/Mods/StarTreksounds/Audio/TNG - Red Alert 1.xwm

I Need a little Debug Help

$
0
0
My code is below this Line, the Error I get is in the instance I'm not able to call the MyGrid Program terminal block stuff.. any advice or knowledge would be great... thanks. also most of the code shown here is not needed to trouble shoot but I wanted to give you the whole program so you can see if its a cascading problem that I just missed..


Code:
//This is the Mark VIII version of this script the focus of this revision is on the HMI and Stability.

public int FZI(string ZN)//Find Zone...
I Need a little Debug Help

Programmable Block script help

$
0
0
hi i had an idea but i dont know how to go about implementing it

my idea is to create a script that updates other programmable blocks through block name

Check altitude

$
0
0
Hi,

I try to make a drone who get in space and then come back to land.

I usually use "Visual Script Builder" to make my scripts and it's work fine.
But I want something that isn't possible with this site.

To go down on the planet I shutdown all the engine from my drone.
This to not use too much fuel, and because of the speed bug in gravity.

I need something like "If altitude < 1500m do start all engine".

I have find this script :...

Check altitude

Gravity Acceleration formula help.

$
0
0
Hello community.

Iam trying to write a script for, lets say, sub-orbital aproach with less fuel consumption possible. The goal is to have a shuttle/pendling cargo ship from ground of the planet to an orbital station bounded to the asteroid, but still inside gravitational field of the planet. Idea is to use natural gravity to slow down aproach naturaly and have at the target altitude as less velocity, as possible. Iam incorporating orbital launch script to have ship speed-up and climbing...

Gravity Acceleration formula help.

New Camera Raycast and Sensor API (Update 01.162 DEV)

$
0
0
by Rexxar:
--------------------------------------------------------------------

This week brings several big changes to the programmable block API. The major features are:
  • IMyRemoteControl.GetFreeDestination has been removed
  • IMySensorBlock.LastDetectedEntity no longer returns an IMyEntity reference, instead returns MyDetectedEntityInfo
  • IMyCameraBlock has new raycast functions to replace GetFreeDestination
  • New MyDetectedEntityInfo struct to contain information...

New Camera Raycast and Sensor API (Update 01.162 DEV)

CybillAI Update Thread

$
0
0
Because Steam only allows so many characters in the description and it can be tough to find
update posts in the comments section I am going to keep the updates to the script here in
this post.

Update 1:



It has been a few weeks since I made CybillAI available on my workshop, I see that quite a few
people have already subscribed. Today's update adds important optimization to Cybill's power
management and turret control code.

*Battery blocks are now...

CybillAI Update Thread

Would this work - working to reduce char count in a Visual Script Builder code

$
0
0
I put together a script to run a hangar airlock system on with the script builder at Visual Script Builder.(so much faster than typing it out myself. I repair syntax and smooth out logic after the fact in Notepad++.)
I am using four different blocks and the tool assembles a "function" for each separate one, so I'm looking to cut down the size by making an actual function that works for all four.
Here are my block declarations.
IMyDoor doorIn =...

Would this work - working to reduce char count in a Visual Script Builder code

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

Camera overlay in the View mode

$
0
0
In the View mode, in the upper left corner of the screen there is a "label" with CustomName of camera. Unfortunately, changes of the CustomName will be not affected until reactivating the View mode. Somehow it's possible to get the updateable HUD or overlay on camera in View mode?

Programmable Block script help 1001

$
0
0
Hello.

can somebody help little moor that usually.
So little information.

I tray make 1 carrier, that carry 4-6 ship.
Carrier main goal is to be only use jump drive to space location, deploy ships and jump to hide.
its deploy 1 ship that is main ship and 4 drones (1 ship is optional backup if first main ship be wrecked)

all ships have some prorogrammed block.
(steam workshop)
Formations Script
Launch Control Script
Whip's Turret AI Slaving Script

i tray make one more prorogram, whit...

Programmable Block script help 1001

Request for access to wheel propulsion override (Steering angle as a bonus)

$
0
0
To whom it may concern,

Request:
I am hoping that we can get access to wheel propulsion through in-game scripting, like we have access to the "Override" property on a Thruster.

Considerations:
I am aware that wheels function differently than thrusters and this would be fine. My expectations given current behavior is that we would get access to toggle (positive or negative) propulsion override as though a user was pressing the W or S keys (respectively).

For simplicity we can assume...

Request for access to wheel propulsion override (Steering angle as a bonus)

Automated assemblers keep inventory level

$
0
0
Hey all,

I just finished building an automated assembler setup that I'm pretty happy with. Basically, it's a system that lets you specify how much of a given item you want to have in inventory, and which assemblers product that item, and the system will enable and disable assemblers as necessary to keep the inventory full.

[​IMG]

To set it up, you need:
One programmable block.
One timer block.
One LCD screen.
At least one assembler per type of item you...

Automated assemblers keep inventory level

PB Scripting Guide: How To Use Self-Updating

$
0
0
Greetings engineers! As you all have (hopefully) read in last week's update post, the PB now has some fancy new self-updating features which means you no longer need timer blocks!

This self-update system is relatively straightforward, but does require a bit of explanation, so let's get into it!


Update Frequency:
The self-update system is controlled through the Runtime.UpdateFrequency property. Those of you who are familiar with GameLogic components should recognize...

PB Scripting Guide: How To Use Self-Updating

Broken Rotor script...

$
0
0
Hi everyone,

I've managed to write this script below which works.... once. the idea is when a button is pressed the rotor moves in that direction by 1 degree from its last position.

Currently the first time you run the block it will set the min and max limits like it should and changes the velocity to positive. For some reason though, the second, third, fourth time the block is run, nothing changes. I'm stumped any help would be greatly appreciated...

Code:
public Program()

{


}...
Broken Rotor script...
Viewing all 645 articles
Browse latest View live