Show Trigger

Visualize a trigger at runtime.

Media
Images


play

Example Videos

Version 5 Update

Change trigger color on enter - Basic Mode

Change trigger color on enter - Advanced Mode


Usage

Basic Mode
  1. Install the Show Trigger Package.
  2. Select the trigger entity.
  3. Choose edit.
  4. At the bottom of the Entity tab, click the button Add to Entity.
  5. Select Create ChildScript FolderShow Trigger.
  6. Change the properties if desired.
  7. Close the entity editor.
Advanced Mode
  1. Install the Show Trigger Package
  2. Add the Show Trigger template onto a trigger entity.
  3. Change the properties if desired.

Properties

Enabled

Enable or disable Show Trigger, set to enabled by default.

Visible

Set the trigger’s visibility, set to enabled by default.

Scale Diameter

Increase the diameter of the neon tubes, useful for extremely large triggers.

Auto Refresh

Automaticclly resize the neon tubes when the trigger’s size changes.

Color

Set the default color for the neon tubes.


Functions

Use these functions with the event system or call these functions from your script using a method of your choice. The examples show two different methods of accomplishing this.

Method 1

trigger.showTriggerScript:TheFunctionName()

Method 2

trigger:SendToScripts("TheFunctionName")

Use one method or the other


ShowTrigger()

Show the trigger.

trigger.showTriggerScript:ShowTrigger()
trigger:SendToScripts("ShowTrigger")

HideTrigger()

Hide the trigger.

trigger.showTriggerScript:HideTrigger()
trigger:SendToScripts("HideTrigger")

UpdateSize()

Resize the neon tubes after changing trigger size. It is the one-time use alternative to the Auto Refresh property.

trigger.showTriggerScript:UpdateSize()
trigger:SendToScripts("UpdateSize")

ChangeColorToRed()

Change the color to red.

trigger.showTriggerScript:ChangeColorToRed()
trigger:SendToScripts("ChangeColorToRed") -- case sensitive

ChangeColorToOrange()

Change the color to orange.

trigger.showTriggerScript:ChangeColorToOrange()
trigger:SendToScripts("ChangeColorToOrange") -- case sensitive

ChangeColorToYellow()

Change the color to yellow.

trigger.showTriggerScript:ChangeColorToYellow()
trigger:SendToScripts("ChangeColorToYellow") -- case sensitive

ChangeColorToGreen()

Change the color to green.

trigger.showTriggerScript:ChangeColorToGreen()
trigger:SendToScripts("ChangeColorToGreen") -- case sensitive

ChangeColorToBlue()

Change the color to blue.

trigger.showTriggerScript:ChangeColorToBlue()
trigger:SendToScripts("ChangeColorToBlue") -- case sensitive

Functions - Advanced

ChangeColorTo(color)

Change the color of the trigger.

The color argument can be a number between 1-5 or it can be the color name as a case insensitive string:

  • 1 = Red
  • 2 = Orange
  • 3 = Yellow
  • 4 = Green
  • 5 = Blue

Examples - Change the color to yellow:

trigger.showTriggerScript:ChangeColorTo(3)
trigger.showTriggerScript:ChangeColorTo("YELLOW")
trigger.showTriggerScript:ChangeColorTo("Yellow")
trigger:SendToScripts("ChangeColorTo",3)
trigger:SendToScripts("ChangeColorTo","YELLOW")

3 Likes

May 17th 2022
Version 3

  • Side lengths are no longer limited to 20,000.
  • Added an option to increase the diameter, which can be helpful for large triggers.

June 12th 2022
Version 4

  • Removed a print() that was left in during debugging.
  • Fixed a typo in an error message.

September 3rd 2022
Version 5

  • Improved error messages.
  • Adjusted the neon tube mesh rotations to improve consistency.
  • Added new properties.
  • Added new functions(event system friendly) to give the creator more control.

New Properties:

  • Visibility - Set the trigger’s default visibility.
  • Color - Choose one of five colors.

New Functions:

Visibility - Change the trigger’s visibility at runtime:

  • Added ShowTrigger() and HideTrigger() to show and hide the trigger at runtime.

Color - Change the trigger’s color at runtime:

  • Added ChangeColorTo(color) to change the color at runtime.

  • Added the following to improve the UX when changing colors using the event system:
    ChangeColorToRed()
    ChangeColorToOrange()
    ChangeColorToYellow()
    ChangeColorToGreen()
    ChangeColorToBlue()

  • Added UpdateSize() to resize the neon tubes after changing trigger size. UpdateSize() is the one-time use alternative to the Auto Refresh property.

September 3rd 2022
Version 6

“Adjusted the neon tube mesh rotations to improve consistency” that was added in v5 has been removed due to a bug that appears to be out of my control.

1 Like