Space Engineers

Space Engineers

276 ratings
SEAT | Seat Entry/Exit Activated Timers
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
535.333 KB
29 Nov, 2021 @ 10:37am
1 Mar, 2023 @ 10:37pm
2 Change Notes ( view )

Subscribe to download
SEAT | Seat Entry/Exit Activated Timers

In 1 collection by Whiplash141
Whip's Scripts
22 items
Description
SEAT | Seat Entry/Exit Activated Timers

  Description
Howdy!

This script allows you to trigger a timer when a particular seat has been entered or exited. You can also specify different timers for entry and exit activation. This script works with seats, cockpits, remotes, beds and cryo bays; pretty much anything you can sit in.


  Features
  • Simple setup
  • Low performance overhead
  • Can trigger timers on seat entry and exit
    • NEW: Can also trigger timers on turret or custom turret controller entry/exit!
  • Per-seat timer configuration
  • Cute, animated running screens :D


  Setup Instructions
  1. Make a group named SEAT (all caps) that contains all the seats, turrets, and custom turret controllers that you want to add entry/exit timers to.
  2. Place this script in a programmable block.
  3. Open the custom data of each seat, turret, or custom turret controller in the SEAT group and set the names of the timers that should be triggered. Leave them blank if you don't want a timer triggered.
  4. Recompile the code to process any Custom Data or group changes.

Repeat steps 3-4 until you have configured all your seats the way you want.


  Custom Data Config
Programmable Block Custom Data
The programmable block running this script will be populated with the following custom data keys:
Key
Valid Values
Description
Group name tag
string
Name of the SEAT group.
Draw title screen
true/false
Determines if the animated title screen will be drawn.

Per Seat Custom Data
Each seat contained within the SEAT group will have the following config keys added to their custom data:
Key
Valid Values
Description
Timer to trigger on entry
string
Exact name of the timer to trigger when this seat is entered.
Timer to trigger on exit
string
Exact name of the timer to trigger when this seat is exited.


  Author's Notes
This script was initially written to support my boy ToedPeregrine4 in his attempt to have immersive control seats with pop-down screens. Pushing buttons manually is for peasants, so I wrote this script to trigger a timer based upon if someone had entered or exited the seat. I was eventually convinced to clean up this code and release it to the public, hopefully y'all can find some neat things to do with it :)

And of course, thanks to my insane friends for helping me come up with a stupid name for this script!

Also, I made the sprites for the cute little running screen using the SESpriteBuilder tool that I developed: https://gitlab.com/whiplash141/spritebuilder/-/wikis/home. It may be of use to scripters trying to visualize and design sprites :)

- Whiplash141
57 Comments
RougeSable 8 Feb @ 8:31am 
Well as far I know, Event controller cannot trigger 1 action when you enter AND 1 action when you leave a seat.
PersonofInter 24 Jul, 2024 @ 3:28am 
Event controller practically does this now :)
PaynMusic 1 Dec, 2023 @ 2:50am 
Engagement** Triggers**

Seat Engagement Activated Triggers. :steamhappy:
Femboi 2 Mar, 2023 @ 10:53pm 
All good, just wanted to keep the timer count as low as i could, was hoping i would just have to change one line to start timer rather than trigger, but what do i know about scripting.
Whiplash141  [author] 1 Mar, 2023 @ 10:41pm 
@Waipa: Try v1.1.2

@Coolbeans: No, but you could have your timer start another one?
Femboi 1 Mar, 2023 @ 6:19am 
Hi whip love the script, is there any way to make it start the timer countdown rather than triggering it?
Waipa 12 Aug, 2022 @ 11:57am 
"Can we use this for the new Turret Control Block"

"No, but I'll see about adding it"

Still hoping for this :D
Whiplash141  [author] 24 Jul, 2022 @ 10:46am 
Yep!
Rhea.licious 23 Jul, 2022 @ 9:02pm 
Damn. Can a RC be used as a "seat?"
Whiplash141  [author] 23 Jul, 2022 @ 8:35am 
yeah that's how the game handles that lol