Space Engineers
Недостаточно оценок
FTL Scripting
   
Наградить
В избранное
В избранном
Удалить
Размер файла
Добавлен
Изменён
374.685 KB
30 июн. 2016 г. в 21:27
3 мар. 2020 г. в 0:06
Обновлений: 5 (просмотреть)

Подпишитесь, чтобы загрузить
FTL Scripting

Описание
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
Gwindalmir  [создатель] 2 июл. 2016 г. в 12:41 
@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 июл. 2016 г. в 11:28 
I'm getting an error with this script:
"Object reference not set to an instance of an object."