Space Engineers

Space Engineers

Không đủ lượt đánh giá
FTL Scripting
   
Giải thưởng
Yêu thích
Đã yêu thích
Bỏ thích
Kích cỡ file
Đã đăng
Đã cập nhật
374.685 KB
30 Thg06, 2016 @ 9:27pm
3 Thg03, 2020 @ 12:06am
5 ghi chú thay đổi ( xem )

Đăng ký để tải xuống
FTL Scripting

Mô tả
This is a sample on how to access the new properties and actions in the FTL mod.
If the FTL mod has loading errors, then this script will not work.

// FTL test void Main(string argument) { var ftl = GridTerminalSystem.GetBlockWithName("FTL Jump Drive"); if( ftl != null ) { var state = ftl.GetValue<string>("Phoenix.FTL.State"); Echo("State: " + state); Echo("TimeRemaining: " + ftl.GetValue<long>("Phoenix.FTL.TimeRemaining").ToString()); Echo("JumpDistance: " + ftl.GetValueFloat("JumpDistance").ToString()); Echo("JumpDistanceInMeters: " + ftl.GetValueFloat("Phoenix.FTL.JumpDistanceInMeters").ToString()); if( state == "Idle" ) { ftl.SetValue<Vector3D?>("Phoenix.FTL.OneTimeDestination", new Vector3D?(new Vector3D(10, 10, 10))); ftl.ApplyAction("Jump"); } } else { Echo("Block not found"); } }
2 bình luận
Gwindalmir  [tác giả] 2 Thg07, 2016 @ 12:41pm 
@smith3700, If the mod has an error, this script won't work.
Currently the mod itself isn't loading my additions, I'm working on that now.
TheRealPeltier 2 Thg07, 2016 @ 11:28am 
I'm getting an error with this script:
"Object reference not set to an instance of an object."