Steam installieren
Anmelden
|
Sprache
简体中文 (Vereinfachtes Chinesisch)
繁體中文 (Traditionelles Chinesisch)
日本語 (Japanisch)
한국어 (Koreanisch)
ไทย (Thai)
Български (Bulgarisch)
Čeština (Tschechisch)
Dansk (Dänisch)
English (Englisch)
Español – España (Spanisch – Spanien)
Español – Latinoamérica (Lateinamerikanisches Spanisch)
Ελληνικά (Griechisch)
Français (Französisch)
Italiano (Italienisch)
Bahasa Indonesia (Indonesisch)
Magyar (Ungarisch)
Nederlands (Niederländisch)
Norsk (Norwegisch)
Polski (Polnisch)
Português – Portugal (Portugiesisch – Portugal)
Português – Brasil (Portugiesisch – Brasilien)
Română (Rumänisch)
Русский (Russisch)
Suomi (Finnisch)
Svenska (Schwedisch)
Türkçe (Türkisch)
Tiếng Việt (Vietnamesisch)
Українська (Ukrainisch)
Ein Übersetzungsproblem melden
Sensor
Interface name: IMySensorBlock
Parent: IMyFunctionalBlock
Fields:
float LeftExtend
float RightExtend
float TopExtend
float BottomExtend
float FrontExtend
float BackExtend
bool DetectPlayers
bool DetectFloatingObjects
bool DetectSmallShips
bool DetectLargeShips
bool DetectStations
bool DetectAsteroids
Actions:
OnOff -> Toggle block On/Off
OnOff_On -> Toggle block On
OnOff_Off -> Toggle block Off
IncreaseLeft -> Increase Left extent
DecreaseLeft -> Decrease Left extent
IncreaseRight -> Increase Right extent
DecreaseRight -> Decrease Right extent
IncreaseBottom -> Increase Bottom extent
DecreaseBottom -> Decrease Bottom extent
IncreaseTop -> Increase Top extent
DecreaseTop -> Decrease Top extent
IncreaseBack -> Increase Back extent
DecreaseBack -> Decrease Back extent
IncreaseFront -> Increase Front extent
DecreaseFront -> Decrease Front extent
Detect Players -> Detect players On/Off
Detect Floating Objects -> Detect floating objects On/Off
Detect Small Ships -> Detect small ships On/Off
Detect Large Ships -> Detect large ships On/Off
Detect Stations -> Detect stations On/Off
Detect Asteroids -> Detect Asteroids On/Off
http://steamcommunity.com/sharedfiles/filedetails/?id=360966557
bool IMySensorBlock.IsActive
I just spent two hours scouring the internet and "guessing" for this little piece of information. unfortunately the documentation is not always accurate/updated. However i found it here
https://cubrr.github.io/space-engineers-doc-collab/html/P_Sandbox_ModAPI_Ingame_IMySensorBlock_IsActive.htm
By the way @Nekochan. rude.
What I am doing is basically this:
The idea is to keep increasing the range of the sensor to establish how far the nearest surface is from my platform, and in this example the sensor starts detecting at exactly 25m, and this is what happens when I manually set the range (1st beacon becomes "false" when set to 24m, and "true" when set to 26m).
I commented out the while loop to single-step through the execution for the purpose of tracking down the error.
However, the 2nd reading (and text assigned to the 2nd beacon) is always the same, even when logically it shouldn't be: When I run the script starting with range 24m, I get "false" (reading at 24m), then range gets increased to 26m, but the 2nd reading is still "false". I checked the range in the K menu and it was indeed incremented as I intended.
The next time I run the script however, the 1st beacon is set to true (still at 26m) when literally nothing has changed.
Does anyone have any idea what's going on?
Edit to add: Or, to look at it another way, it seems that the sensor's detection is only updated once ever phyics step (i.e. 1/60s) while no time passes during the script's execution...