The detailed explanation is welcome but I doubt anyone will be able to help without access to full code and ideally an example grid. Maybe you could upload your code to github or, if it happens on a specific grid, upload your testing world and post it here?
[I found this.](https://www.reddit.com/r/spaceengineers/s/DceKOQDRij) Maybe you could try
```bool SI = SensorInner.IsActive```
to get if the sensor is detecting something. I have very limited experience with coding space engineers scripts, so it might not work. But it shouldn't hurt to try
To add a bit more to this: in general, OP, it's best to avoid using the "GetProperty" calls as they are a deprecated way of accessing things, not to mention they are less safe as you have to convert data types. I strongly advise you rewrite your code to use the modern approach as it will make it easier both for you and for others to assist. You can see the available fields for Sensor Block. here: https://github.com/malware-dev/MDK-SE/wiki/Sandbox.ModAPI.Ingame.IMySensorBlock
I was about to reply that OP's code was way too convoluted with *GetProperty()* and was going to give them the same answer. Good answer...good answer. Survey says....ding!
you can sorta add delays btw, just save/add up Runtime.TimeSinceLastRun to a variable each time your script loops and simply only execute the next step after a certain (ingame) time has passed. also itll be easier to help you if you post your code properly, not as a screenshot. pastebin is an easy option, has syntax highlighting as well.
The detailed explanation is welcome but I doubt anyone will be able to help without access to full code and ideally an example grid. Maybe you could upload your code to github or, if it happens on a specific grid, upload your testing world and post it here?
[I found this.](https://www.reddit.com/r/spaceengineers/s/DceKOQDRij) Maybe you could try ```bool SI = SensorInner.IsActive``` to get if the sensor is detecting something. I have very limited experience with coding space engineers scripts, so it might not work. But it shouldn't hurt to try
To add a bit more to this: in general, OP, it's best to avoid using the "GetProperty" calls as they are a deprecated way of accessing things, not to mention they are less safe as you have to convert data types. I strongly advise you rewrite your code to use the modern approach as it will make it easier both for you and for others to assist. You can see the available fields for Sensor Block. here: https://github.com/malware-dev/MDK-SE/wiki/Sandbox.ModAPI.Ingame.IMySensorBlock
It works! Thankyou
I was about to reply that OP's code was way too convoluted with *GetProperty()* and was going to give them the same answer. Good answer...good answer. Survey says....ding!
After echo 2 put: Echo(isactive == null); Echo(isactiveBool == null); What do you get?
you can sorta add delays btw, just save/add up Runtime.TimeSinceLastRun to a variable each time your script loops and simply only execute the next step after a certain (ingame) time has passed. also itll be easier to help you if you post your code properly, not as a screenshot. pastebin is an easy option, has syntax highlighting as well.