Makinom - Game Toolkit for Unity
  • Features
  • Showcase
  • Guide
    • Documentation
    • Tutorials
    • Extensions
    • API
  • Makinom 1
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get Makinom

Guide

Getting Started

  • Introduction
  • First Steps
  • Game Starters
  • Components Overview
  • Upgrading a Makinom 1 Project

Editor

  • Makinom Editor Overview
  • Node Editor
  • Asset Sources
  • Editor Section
  • Base/Control Section
  • Game Section
  • UI Section
  • Templates Section

Features

  • Schematics
  • Dialogue Importer
  • Schematic Nodes
  • Formula Nodes
  • Languages
  • Input Keys
  • Audio and Music
  • Game States
  • Pooling
  • Saving Game Objects
  • Scene Objects
  • Save Games
  • Variables
  • Selected Data

Machines

  • Machine Components Overview
  • Animation Machine
  • Animation State Machine
  • Application Machine
  • Auto Machine
  • Collision Machine
  • Global Machine
  • Interaction Machine
  • Render Machine
  • Tagged Machine
  • Template Machine
  • Tick Machine
  • Trigger Machine

UI System

  • UI System Overview
  • UI Layers
  • UI Layouts
  • UI Boxes
  • HUDs
  • Flying Texts
  • Text Codes
  • Unity UI Module
  • HUDs: Content Providers
  • HUDs: Conditions
  • HUDs: Click Actions

Scripting

  • Scripting Overview
  • Code Extensions
  • Custom Save Data
  • Custom Component Save Data
  • Custom Nodes
  • Starting a Schematic

Advanced Topics

  • Build Troubleshooting
  • Performance Optimizations
  • Home
  • Guide
  • Documentation
  • Machines
  • Trigger Machine

Trigger Machine

Table of Contents
  • Start Types
    • Trigger Enter
      • Additional Start Conditions
      • Example
    • Trigger Stay
      • Additional Start Conditions
      • Example
    • Trigger Exit
      • Additional Start Conditions
      • Example

Learn more about trigger machines and what you can use them for.

Trigger machines are Unity components that are added to game objects. They’re mostly used for

A trigger machine component can be added through the components menu (Makinom > Machines > Trigger Machine) or the scene wizard (Add Machine > Trigger Machine). A game object with a trigger machine is represented in the Unity scene view by this gizmo icon:

You can learn more about machine components in general and their basic settings here.

Start Types #

A trigger machine is started by trigger callback functions. This requires collider and rigidbody components on the game objects and the machine’s collider to have Is Trigger enabled.

By default, trigger machines can only be started when the player’s game object enters the trigger. Optionally, they can also be started by other game objects – this can further limited to game objects with a defined name, tag or component attached.

Trigger Enter #

Started when a game object enters the machine’s trigger. It’s implemented in the component’s OnTriggerEnter and OnTriggerEnter2D functions.

Additional Start Conditions #

The Trigger Enter start type can optionally be limited by a layer mask. This can be used to only start the machine when game objects of a defined layer enter the trigger.

Example #

This start type can be used to display a notification when the player enters an area of the scene. Use a Show Dialogue node using the Auto Close dialogue type to show a notification for a short time.

Trigger Stay #

Started while a game object stays in the machine’s trigger. It’s implemented in the component’s OnTriggerStay and OnTriggerStay2D functions.

Additional Start Conditions #

The Trigger Stay start type can optionally be limited by a layer mask. This can be used to only start the machine when game objects of a defined layer stays in the trigger.

Example #

This start type can be used to reduce the health of the player while he stays within a dangerous area. Use a Change Variables node to change variables (e.g. int variable health).

Trigger Exit #

Started when a game object leaves the machine’s trigger. It’s implemented in the component’s OnTriggerExit and OnTriggerExit2D functions.

Additional Start Conditions #

The Trigger Exit start type can optionally be limited by a layer mask. This can be used to only start the machine when game objects of a defined layer leaves the trigger.

Example #

This start type can be used to disable game objects when the player leaves the area. Use a Activate Object node to enable/disable game objects.

Machines
Share This Article :
  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
Updated on December 16, 2020
Table of Contents
  • Start Types
    • Trigger Enter
      • Additional Start Conditions
      • Example
    • Trigger Stay
      • Additional Start Conditions
      • Example
    • Trigger Exit
      • Additional Start Conditions
      • Example
Sitemap
  • Features
  • Showcase
  • Guide
    • Documentation
    • Tutorials
    • Extensions
    • API
  • Makinom 1 Hub
    • Tutorials
    • Plugins
    • API
  • Support
  • Forum
  • Get Makinom
  • Contact
  • Blog
  • ORK Framework
  • gamingislove.com
Categories
  • Makinom 1 (97)
    • Tutorial (97)
      • 2D Platformer (14)
      • 2D Roguelike (8)
      • Breakout (6)
      • How-to (34)
      • Match 3 (6)
      • Schematic (4)
      • Scripting (6)
      • Space Shooter (11)
      • Survival Shooter (8)
  • News (11)
  • Release (68)
Search

© 2015 Gaming is Love e.U.

Disclosure: This site may contain affiliate links, which means I may receive a commission if you click a link and purchase something that I have recommended. While clicking these links won’t cost you any money, they will help me fund my development projects while recommending great assets!