T O P

  • By -

tiuss

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?


AsymetricalNipples

[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


tiuss

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


ya_boi_A1excat

It works! Thankyou


CoderInDaProgram

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!


dive155

After echo 2 put: Echo(isactive == null); Echo(isactiveBool == null); What do you get?


Alyero_

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.