Space Engineers

Space Engineers

280 个评价
SEAT | Seat Entry/Exit Activated Timers
2
   
奖励
收藏
已收藏
取消收藏
标签: other_script
文件大小
发表于
更新日期
535.333 KB
2021 年 11 月 29 日 上午 10:37
2023 年 3 月 1 日 下午 10:37
2 项改动说明 ( 查看 )

订阅以下载
SEAT | Seat Entry/Exit Activated Timers

在 Whiplash141 的 1 个合集中
Whip's Scripts
22 件物品
描述
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 条留言
RougeSable 2 月 8 日 上午 8:31 
Well as far I know, Event controller cannot trigger 1 action when you enter AND 1 action when you leave a seat.
PersonofInter 2024 年 7 月 24 日 上午 3:28 
Event controller practically does this now :)
PaynMusic 2023 年 12 月 1 日 上午 2:50 
Engagement** Triggers**

Seat Engagement Activated Triggers. :steamhappy:
Femboi 2023 年 3 月 2 日 下午 10:53 
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  [作者] 2023 年 3 月 1 日 下午 10:41 
@Waipa: Try v1.1.2

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

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

Still hoping for this :D
Whiplash141  [作者] 2022 年 7 月 24 日 上午 10:46 
Yep!
Rhea.licious 2022 年 7 月 23 日 下午 9:02 
Damn. Can a RC be used as a "seat?"
Whiplash141  [作者] 2022 年 7 月 23 日 上午 8:35 
yeah that's how the game handles that lol