Event Trigger

Description

  • trigger event(s) using one or more onCollision, onEnter, or onInteract actions
  • (optional) within x time
  • (optional) trigger to reset events

Features

  • eventTrigger controller for settings on locator
  • one or more triggers
  • event counter to require x triggers to activate event(s)
  • optional timer to complete all triggers
  • optional reset trigger to do event(s) after inital event

Install

  • place eventTrigger in world near desired event
  • rename eventTigger or place under desired event for world tree organization
  • locator used for easy to find and modify as needed

Configuration

  • eventTrigger

    • (locator)
    • template acts as controller
  • counter

    • the number of triggers required for events
    • a counter of 1 could have 2 triggers to reach that number
  • timer

    • 0 is no timer
    • greater than zero for a timer to be used
  • triggers

    • to be added to counter
    • supported functions: on interact, on collision, on trigger enter
  • events

    • the action the trigger actually does
    • ex. opening a door, turning on a light, etc.
  • resetTriggers

    • the events to reset on triggers if timer fails
    • resetEvent uses this to reset triggers, etc.
  • resetEvents

    • undo the events
    • reset the events on triggers

Template Logic

Property Logic
activate 2 triggers within 5 seconds
the keypad uses a trigger box with a prompt
- disabled on interact
- disabled on event; no longer needed
- re-enabled on reset
event open the door
reset trigger if timer goes past 5 seconds
reset events on trigger exit of vault door

Trigger Settings

All Triggers Property Setting
Players Only Checked (true)
Interactable Checked (true)
Triggers Property Events
Button Trigger On Interact eventTrigger1 / eventTriggerScript / Interact
buttonTrigger / triggerInteractableScript / SetFalse
Gate Trigger On Trigger Enter eventTrigger1 / eventTriggerScript / OnEnter
Pressure Pad On Collision eventTrigger1 / eventTriggerScript / Collision
Vault Door* On Trigger Exit eventTrigger1 / eventTriggerScript / ResetEvents
eventTrigger1 / eventTriggerScript / ResetTriggers

Note: configured to reset everything. trigger and event resets are different due to one trigger maybe removed and only if the event is active, reset the event and not the other triggers.

Event Settings

Property Setting
Counter 2
Timer 5
Events bankVaultDoor1 / openCloseScript / SetOpening
buttonTrigger / triggerInteractableScript / SetFalse
Reset Triggers buttonTrigger / triggerInteractable / SetTrue
Reset Events bankVaultDoor1 / openCloseScript / SetClosing
1 Like

updated package

Other Screenshots for events: (placeholder)