Logic Gadgets: Trigger Zone

 

Icon
Name of gadget Trigger Zone
Section Sensors & Input
Number of Tweak pages 3
Author LadylexUK, QuietlyWrong
Last updated 23 May 2019 [EA v1.02]

Description

This gadget is used to detect if something has entered a specified area and outputs a signal. The zone can be changed in size and shape, it can be moved around your level to where you need it, and you can tweak what it it will detect in that zone and numbers of objects it detects.

The trigger zone can be altered with various handles on the trigger zone itself without the need for a menu. You can rotate and resize on the X, Y and Z axis and even move the trigger zone away from the gadget stamp. A dashed line will show which zone is attached to which gadget.

If you place a trigger zone in your level then drag it onto a microchip it will remember where it was last placed. This helps keep gadgets on the microchip and not have trailing wires.

Example Tutorial (from Media Molecule)

  1. Stamp a trigger zone and a light in your scene
  2. Notice the output port called detected on the right side of the trigger zone. It’s the most crucial output here, the one that sends a signal when it’s found what it’s looking for.
  3. Connect the detected port of the trigger zone to the power port on the light. Now when it detects something it sends a signal that will power the light.
  4. Tweak the trigger zone. Under things to detect note that the zone is set to detect possessed controller sensors. All puppets have a controller sensor in their heart.
  5. Leave the tweak menu open so you can see the zone
  6. Stamp a blank puppet into the scene.
  7. Go to test mode and possess the puppet
  8. Run into the trigger zone
  9. Ta Dah! The light comes on when the puppet enters the trigger zone.
  10. Try adjusting the zone fall off to make it bigger than the zone and see what happens to the light then.

Tweak Menus

Click on arrows to view details

Tweak Menu 1: Important Properties & I/O
trigger zone - important
Image: Beta. Confirmed identical to EA
  1. Tweak Menu page 1: Important Properties & I/O
  2. Things to detect
  3. Name of thing to detect
  4. Detection scope (tag)
  5. Number required
    5a. Number required input
    5b Number required output
  6. Number detected
    6b. Number currently detected output
  7. Dreamiverse Element to Detect
  8. Scene element
    8a. Input wire of element to be detected
  9. Object detected output
    9a. Main output signal
  10. Consider players toggle
    10a Fat wire output all players
  11. Power
  1. Menu page Indicator
  2. Things to detect
    Here is where you choose what the trigger zone will detect.You can choose only one.

    • Possessed controller sensors – any possessed character that the imp has entered.
    • Tag – a named tag (input in field below)
    • Imp – any free floating imp
    • Cameras – any currently being used
    • Dreamiverse Element (an element from the Dreamiverse (must be selected in Dreamiverse Element to Detect [7])
    • Label – an object that has a named label (input in field below)
    • Scene Element – an object in your scene (must be selected in Scene Element To Detect [8])
    • Possessable Controller Sensors – any controller sensor in the scene that can be possessed. A specific name may be provided in the field below.
    • All Controller Sensors – any controller sensor, regardless of its settings or status. A specific name may be provided in the field below.
  3. Name of thing to detect
    Input the tag name, label name, controller sensor here (you can only choose one and it must match the thing to detect from the previous section). Enter the name directly with the on-screen keyboard or hover the imp tip over the field and press up/down on the d-pad to cycle through all names in your current scene. If no name is specified the trigger zone will only detect unnamed things (it’s not recommended that you deliberately use this functionality because it can make it much harder to debug misbehaving logic).
  4. Detection scope
    This section is only applicable if you have chosen tag in things to detect.

    • Everywhere
      Detects any tag.
    • Here
      Detects only tags within the same group or microchip as the trigger zone.
    • Not Here
      Detects only tags not in the same group or microchip as the trigger zone.
  5. Number required
    Use this slider if you need more than one instance of the item detected before the trigger zone is activated. The default for this is 1. You can move the slider to the left to get All (so all instances of your chosen detected object have to be in the trigger zone) or move to the right to increase the number (when more than 1 of the chosen objects are needed).
  6. Number detected
    This is an output socket that sends a signal containing the number of chosen items it can currently detect up to the number required (it will not produce a count above that). It also includes objects in the falloff zone.
  7.  Dreamiverse element
    This is only applicable if you have chosen Dreamiverse element as your chosen detected item. It open the search facility to allow you to select an object from the Dreamiverse (yours or other people’s).
  8. Scene element
    This is only applicable if you have chosen Scene element as your chosen detected item. Wire your chosen object that is in your scene into the input socket. Unlike a Dreamiverse element, the object has to be in your scene so that you can wire it.
  9. Object detected output
    This produces an output signal of 0 or 1 to indicate whether it has detected the required item and number of items. If a falloff zone is used the number produced may be between 0 and 1 depending on where the objects are within the falloff area of the trigger zone and the closer they are to the actual trigger zone.
    The output is a fat wire, which when used with Consider Players can be split into each of 4 players information, so actions can be different depending on the player being detected.
  10. Consider players
    This is either on or off. You can use this to detect if an individual player is within a trigger zone.
  11. Power
    Available on all pages of the menu. You can wire into this to turn this gadget on.
Tweak Menu 2: Zone Size

Image: Beta. Confirmed same as EA
  1. Tweak Menu page 2: Zone Size
  2. Zone Shape
  3. Zone Size in m
    3a. Zone Size input
    3b Zone Size Output
  4. Zone Falloff
    4a. Zone Falloff input
    4b, Zone Falloff output
  5. Power

1.Menu page indicator

2. Zone Shape

Select the shape of the trigger zone.

  • Sphere
  • Cube
  • Cylinder
  • Cone
  • Ellipsoid
  • Whole Scene

3. Zone Size

Use the slider to increase/decrease the size of the trigger zone. Does not apply if you chose the whole scene. You can also change the size and rotation of the zone directly with the imp and various handles. Or by grabbing the zone itself and holding d-pad up or down.

4. Zone Falloff

This adds an extra area to the trigger zone outside the main zone and can be used to create effects where something alters due to the proximity of an object in relation to the trigger zone rather than a straight in or out detection. This is useful for increasing brightness of a light, or the volume of a sound, or the pitch of a sound as a player moves closer to the trigger zone.

5. Power

Available on all pages of the menu. You can wire into this to turn this gadget on.

Tweak Menu 3: Labels
trigger zone - labels
Image: Beta. Confirmed same as EA
  1. Tweak Menu page 3: Labels
  2. Detect Visible
  3. Detect Collidable
  4. Match Mode
  5. Detect labels
    5a. Input detect labels
  6. Power

1. Menu page indicator

2. Detect Visible

  • Detect only objects that are visible.
  • Detect only objects that are hidden (invisible).
  • Detect all objects, visible or invisible.

3. Detect Collidable

  • Detect only objects that are collidable.
  • Detect only objects that are not collidable.
  • Detect all objects, collidable or not.

4. Detect Labels Match Mode

  • Any (find objects that match any of the below labels, can match any or all).
  • All (find objects that have all the below labels (must match all) (unlabelled is deselected).

5. Detect labels

These labels can be set in each object, element or group or shape and can be used to determine actions that apply to only a certain sort of object. For example you may wish to only detect foe (enemies) and ignore friends and only inflict health damage on the foes.

  • Friend
  • Foe
  • Scenery
  • Object
  • Machine
  • Weapon
  • Missile
  • Target
  • Unlabelled

6. Power

Available on all pages of the menu. You can wire into this to turn this gadget on.

Lex Tips

This gadget’s output is a signal. While the object is within the trigger zone the gadget will send out a continuous signal that you can power another gadget. Once the player or object is out of the zone, that signal will stop and no power will be sent.

If you need the zone to power something on as soon as the player enters the area, and regardless of whether they step out of it afterwards use a counter. Wire the object detected output to a counter + input (set to 1) and wire the counter full output to whatever you want to power. If you want to stop the power link to the counter reset button. This will allow the player to trigger it again if they step into the trigger zone ( for a one shot situation where it only happens the once you may need a further counter and a NOT gate).

Useful Tutorials

Basic Logic (Trigger Zone)

Beginners Guide to Tags and Trigger Zones

Version Updates

v1.01 – two new “Things to Detect” added – Possessable Controller Sensors and All Controller Sensors.
v1.02 No changes. Menus confirmed as correct.

Advertisements

Comments and Feedback

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Blog at WordPress.com.

Up ↑

%d bloggers like this: