Fun with Triggers

Got questions about Shipmaker? Get answers here. Please read the stickied topics first!

Moderators: th15, Moderators

Post Reply
thanto_
Commander
Commander
Posts: 157
Joined: Sat Feb 02, 2008 4:47 pm

Fun with Triggers

Post by thanto_ »

I thought it might be fun if we created a list of interesting things that can be done with triggers, just like the custom weapons thread. When adding to the thread, make sure to include an example of use.



for all sections,

EDIT:
Mode: Rotate

ED2
Rotating: Disabled (unless otherwise specified)
CW Rot frames: 1 (unless otherwise specified)
CCW Rot frames: 1 (unless otherwise specified)
Borders: Enabled
CW Border: -60
CCW Border: 60


Triggers template:
Trigger on action 1:
Trigger on action 2:
Trigger off action 1:
Trigger off action 2:




Single-Input 2-Mode Switch:
Trigger on action 1: <INPUT1>
Trigger on action 2: <INPUT1>
Trigger off action 1: Rotation reach CW border (s)
Trigger off action 2: Rotation reach CCW border (s)
Start angle: -60 to start ON or -60 to start OFF

Example of use: create a simple switch toggled by a single key to turn something on or off



Egg Timer:
Trigger on action 1: <INPUT1>
Trigger off action 1: Rotation reach CW border (s)
CW Rot frames: <DELAY1>
CCW Rot frames: 1
start angle: -60

Explanation: on INPUT1, it immediately hits its CCW border, which can be used to trigger other things, then it returns to the CW border in DELAY1 frames. Basically, it can immediately trigger something on INPUT1, but only once, and it won't take any more input until after DELAY1 frames.

Use: It can be used for delaying of triggers until something is ready. For example, use the CCW border hit to trigger the start of a transformation. You wouldn't want attempt to stop the transformation mid-process and screw things up, so put an egg-timer in your control circuit.



Preserve Trigger:

3 sections

#1: single-input 2-mode switch

#2: constant output switch
Trigger on action 1: Rot reached CW border --> #1
Trigger on action 2: Rot reached CW border --> #1
Trigger off action 1: Rot reached CCW border --> #3
Trigger off action 2: Rot reached CCW border --> #1

explanation: this is a sub component. basically, once enabled, it rapidly rotates, hitting a border on each frame, hitting the same border every other frame. That is, until something turns it off.

#3: egg timer
<INPUT1>: Rot reached CW border --> #2


Explanation: turning on the toggle switch starts the constant output switch. The constant output switch will hit its borders constantly until the egg-timer is tripped. So, if the egg-timer is in sitting pretty, the egg-timer will be tripped, turning off the constant output switch. But if the egg-timer is counting down, the constant output switch will stay constantly oscillating until the egg timer is tripped. The constant output switch can also be turned off mid-process. So, if you change your mind, it'll turn off.

Use: immediate redeployment after undeploying. So, if for example, your ship is in the process of putting it's shields back up and putting its weapons away, you can tell it to immediately take its weapons back out again once its done, rather than watching it constantly, waiting for it to finish, then telling it to redeploy, costing precious time.



more to come! Feel free to post your own!
Post Reply