Space Engineers

Space Engineers

Isy's Altitude Trigger
76 Comments
WardenWolf Mar 30 @ 8:45pm 
This is honestly completely superseded by the Event Controller. You don't need this script anymore. @Isy, you can probably flag this as obsolete.
that guy Mar 23, 2024 @ 2:15am 
also quite useful for pull up alarms
MrFox Dec 14, 2022 @ 9:09am 
@johny use a timer block to trigger them
@an egg what error do you get?
an egg cultist Nov 3, 2022 @ 4:57pm 
Script will not work for me
WardenWolf Mar 8, 2022 @ 9:24pm 
Could we get a variant of this that triggers a timer at a specific planetary gravity level instead? Or a feature upgrade to this that adds it? A lot of modded planets have deeper atmospheres.
Johny Sep 20, 2021 @ 11:51pm 
thanks for the link looks good and useful for flyers not or vehicles/piston activation though.
Isy  [author] Sep 20, 2021 @ 1:10am 
Have a look at the "Hover Aligner" script for that.. It basically does what you want:

https://steamcommunity.com/sharedfiles/filedetails/?id=583272553
Johny Sep 17, 2021 @ 7:08pm 
Hi Loving all your scripts as I simple don't understand it haha but I loving using them and your solar have saved me so much room,

popped into this altitude one, was wondering if it is possible to repurpose this one (or a new one) to do a type of "comparison check" I.E have 4 sensors one each corner of a vehicle, upon activation it reads whichever is the highest (altitude) and the others activate until they equal it? (by initiating a piston / hinge etc) aka self leveling? don't know if this is even feasible or how hard to achieve, just an idea. anyhow thanks again for a great mod and lots of fantastic scrips :D
BLUNT Aug 12, 2021 @ 8:12am 
Any chance this could detect gravity for putting satellites in low orbit? Unless you have a different script... ;)
Airomis May 10, 2021 @ 5:08pm 
well you could just set the first timer to run the argument run again wouldnt that work?
shumbalion May 10, 2021 @ 8:40am 
Oh! You have to click run haha :D I was making a copy each time to test and it doesn’t run the script on the copy lol! Not sure if that would cause problems if printing from a blueprint? Just a thought.

I was also trying to get it to trigger multiple times by putting something like 400;TimerBlock1; 200;TimerBlock2; 75;TimerBlock4; in the argument but with no luck. I’m guessing I need to use multiple program blocks for this?

On a side note I haven’t used a lot of SE scripts, it was a little unclear that I needed to put this in the argument and hit run.

You make a lot of great scripts, they are greatly appreciated. So thank you Isy. =)
capitan Nov 24, 2020 @ 9:49am 
I have tried basically everything to get this to work but I just dont get it, a tutorial video would help but anyways nice script for everyone who actually got it to work, ill go search for another one.
Isy  [author] Jul 20, 2020 @ 2:14am 
Nice to hear, that you find it useful.. You're welcome ;)
Mighty_Assa Jul 19, 2020 @ 5:31am 
works great. i set my gravitygenerator to be on when entering a planet and off when leaving. gonna bind it with a sound mod and a timer to get informed :) thx Isy
Tycho_Leksten May 7, 2020 @ 10:17pm 
I have been using a Gravity drive ship and the Gdrive drops out at 0.5Gs. And since different planets all have their own gravity values, I was wondering if there is a way to get this Scriped to trigger based on gravity?
BeerKegBob Apr 18, 2020 @ 4:58pm 
This will be great when loosing connection in MP servers. As we know if your going to have a connect problem its probably when your trying to escape atmo or trying to reenter.
Isy  [author] Nov 30, 2019 @ 12:27am 
Just follow the instructions inside the script... The syntax is:

altitude;timername

So if you want the script to toggle the timer "Timer Block Dampeners" at 100 meters, run the script with:

100;Timer Block Dampeners

The script is only executed until the condition is met and will be on standby after that.. You can however restart the script with the executed timer and another condition again..
Vespasian Nov 28, 2019 @ 9:59am 
Isy. I having trouble following the syntax of the instructions please be patient. I'd like the script to trigger my dampeners when a ship reaches 1000 meters. How would I set that up using a PB & Timer Block? Does what I name these blocks matter? Ex. should there be a value in the name that relates to the altitude or something else etc. Your scripts are great and usually very easy to set up but this one has me flummoxed. Thank you.
Isy  [author] Sep 20, 2019 @ 2:17pm 
The purpose of this script is to trigger a timer to execute actions.. It doesn't provide any values for other means..
DeadlyRemix Aug 30, 2019 @ 9:29am 
i can buy you a beer
DeadlyRemix Aug 29, 2019 @ 2:07pm 
hey i'm very new to this coding side so i hardly understand a thing. just got LCD panels to work. BUT... how would you extract the speed and altitude from the script into another or as a raw value? sorry i suck
Isy  [author] Jun 29, 2019 @ 10:43am 
?
Mr B. Jun 29, 2019 @ 10:03am 
He's done it again, Isssssssssssssssy! :D
Isy  [author] Apr 8, 2019 @ 3:51pm 
Version 1.1.1:

- Changed: Adjusted the LCD screens to the newest API changes.
Dj0z Feb 13, 2019 @ 1:14pm 
Good to hear, i have a BP waiting to use it already.
Isy  [author] Feb 13, 2019 @ 12:55pm 
I will update all my scripts once the final update is live..
Dj0z Feb 12, 2019 @ 12:57pm 
Did not load in survival overhaul playtest #2 for me.
Isy  [author] Nov 21, 2018 @ 12:23pm 
Cool!
AstralJaeger Nov 21, 2018 @ 11:29am 
I figured it out, I need to pass it as parameter, not as Block name. Great script! Works like a charm now!
Isy  [author] Nov 21, 2018 @ 10:16am 
Do you measure from ground or sea level?
AstralJaeger Nov 21, 2018 @ 9:38am 
I have a problem with the script, I wont trigger my Timer called 8000;Timer 1; when I pass the 8000m height.
ThePandyMan Sep 8, 2018 @ 5:12pm 
Thank you! I bought the game 2 days ago, so this is news to me.
Isy  [author] Sep 8, 2018 @ 4:04am 
This sounds like an owner conflict to me.. When you blueprinted it, it probably was owned by you or nobody.. When welding it again, it gets the owner of the welder and since there was an owner change, it needs to be recompiled.. You should check all owners (welder, original, blueprint) and set them all to the same..
ThePandyMan Sep 7, 2018 @ 7:14pm 
I have been attempting to use this epic script to trigger a warhead to detonate when it reaches a specific altitude. I am having an issue where I have to re-compile the script in order for it to work
because the remote control is not being detected after it is spawned and this is problematic when respawning the warhead with a projector system. Any advice to fix this issue?
Terramir Jun 19, 2018 @ 1:03pm 
ok, thanks anyway.
Isy  [author] Jun 19, 2018 @ 11:39am 
That's not too hard but I won't do any program requests.. Scripting is my hobby and I upload the things I've done to the workshop so that other people could benefit from them as well. If someone has a good idea to extend my already existing scripts with new features, I'm always willing to have a look at that.. But coding one script for one person I don't know - sorry, no!
Terramir Jun 19, 2018 @ 8:53am 
how hard would it be to do that? im building a space tether in survival and i need it to stop building when it runs out of plates.
Terramir Jun 19, 2018 @ 8:52am 
i just picked the script on top of your workshop items so i could ask you. since you cant message people if they aren't your friend.
Isy  [author] Jun 19, 2018 @ 3:22am 
Yes, but this has nothing to do with this script..
Terramir Jun 18, 2018 @ 12:39pm 
would it be possible to make a script that would trigger a timer when there were <X number of steel plates in a designated container? thanks.
Isy  [author] May 23, 2018 @ 2:26pm 
Update!
Version 1.1.0:

- Added: the script now detects remote controls as well. There has been added an option to define the wanted cockpit or remote control in the settings. By default, the first found cockpit or remote control is used.
- Added: the script can now run programmable blocks as well. If you only set the PB name, it will be executed with a blank argument. To specify an argument, add it as the third parameter, e.g.: '100;Programmable Block;pause' - this will execute the PB named 'Programmable Block' at a 100 meters with the action 'pause'.
- Added: trigger by speed. The script can now trigger timer blocks or programmable blocks at a certain speed. The syntax is: 'speed + "ms";blockname', e.g.: '50ms;Timer Block 2' - this will trigger 'Timer Block 2' at 50m/s.
Isy  [author] May 23, 2018 @ 2:26pm 
- Changed: the safety margin for triggering at a specific altitude is decreased to 2.5 meters and now based on the current speed (lower speed = lower margin)
- Changed: the current speed is now shown on the LCD and PB info. Some texts were rearranged, too.
- Internal: the used reference block (cockpit or remote control) is now shown in the PB's custom data.
Isy  [author] May 20, 2018 @ 3:15pm 
Well, if you did it already, I don't need to write it ;-) my script was meant to be simple anyway.. But your approach sounds interesting..
Sich May 20, 2018 @ 1:50pm 
@Isy : I have build my own script for the speed.
My use is for drone leaving planet.

I use altitude and speed.
If drone speed is > 9800 do stop the engine
if drone speed is < 9000 start the engine.

This use less fuel.
I combine that with altitude to only start a part of the engine.
altitude < 5000 do start all engine
altitude between 5000 and 15000 start 75% of the engines
altitude between 15000 and 25000 start 50% of the engines
altitude > 25000 start 25% of the engines.

And ofc altitude > 42000 disable thrust override, start all directionnal engine, and start autopilot.

With this I use really less fuel and I don't have issue with the autopilot speed bug.
LEGION May 20, 2018 @ 1:42pm 
Nice, message me when its done ok
Isy  [author] May 20, 2018 @ 1:30pm 
@Legion: that's on my to do list
@Sich: Trigger at a certain speed? What use case do you have in mind?
@Jedd: Thanks ;-)
LEGION May 20, 2018 @ 12:10pm 
Can you please make it work with a remote control like every other of your scripts
Im not putting a cockpit on my 2x2 bomb
Sich May 20, 2018 @ 5:36am 
@Isy : Can you make a similar mod but who give the current speed ?
Dead Jedd May 20, 2018 @ 4:44am 
Hello, I must admit i have been using your scripts since i have been playing SE and i still use them now, that is some good work you do m8 can't wait for the next one.
SioxerNikita May 20, 2018 @ 4:14am 
Technically you can do that, but it is a bit more awkward and much less intuitive.
You could setup two timers, each in a different state between on and off.
You would need a third timer to trigger both and flip their states. It is also more error prone, since the states of the timers can be reversed, and lead to the wrong timer being triggered.

If you have multiple heights you start increasing the amount of timers needed by a significant bit, because each height needs to have its own extra timers to flip states between them, and can quickly become quite complicated. Having the capability to set a timer for when you ascend a height and descend a height allows you to not have to deal with on/off states of timers.