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
  • Interaction Machine

Interaction Machine

Table of Contents
  • Start Types
    • Interact
      • Additional Start Conditions
      • Example
    • Key Press
      • Additional Start Conditions
      • Example
    • Mouse Down
      • Additional Start Conditions
      • Example
    • Mouse Drag
      • Additional Start Conditions
      • Example
    • Mouse Up
      • Additional Start Conditions
      • Example
    • Mouse Up As Button
      • Additional Start Conditions
      • Example
    • Mouse Enter
      • Additional Start Conditions
      • Example
    • Mouse Over
      • Additional Start Conditions
      • Example
    • Mouse Exit
      • Additional Start Conditions
      • Example

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

Interaction machines are Unity components that are added to game objects. They’re mostly used for game mechanics involving player interaction, like showing a dialogue when talking to a NPC.

An interaction machine component can be added through the components menu (Makinom > Machines > Interaction Machine) or the scene wizard (Add Machine > Interaction Machine). A game object with an interaction 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 #

An interaction machine is started by player interactions, e.g. using the Interact Key or mouse/touch.

Interact #

Started upon player interaction. The player can interact with game objects by pressing the Interact Key (defined in the Makinom editor: Base/Control > Game Controls > Interaction Settings).

A game object is available for interaction when it’s selected or within the player’s Interaction Controller trigger. You can learn more about interactions in this how-to.

Additional Start Conditions #

The Interact start type can optionally be limited by the distance between the player and the machine’s game object. This can be used to only start the machine when within a defind range.

The default maximum interaction distance is defined in the Makinom editor (Base/Control > Game Controls > Interaction Settings) and can be overridden by each interaction machine individually. Setting the maximum distance to -1 will disable distance checks (default setting).

Example #

This start type can be used to display dialogues with NPCs. Use a Show Dialogue node to display a dialogue or choice dialogue.

Key Press #

Started upon the player pressing a defined input key. This can optionally be limit to only happen while the player is within the the trigger of the machine’s game object or while colliding with the machine’s game object.

Additional Start Conditions #

The Key Press start type can optionally be limited by the distance between the player and the machine’s game object. This can be used to only start the machine when within a defind range.

The default maximum interaction distance is defined in the Makinom editor (Base/Control > Game Controls > Interaction Settings) and can be overridden by each interaction machine individually. Setting the maximum distance to -1 will disable distance checks (default setting).

Example #

This start type can be used to show game menus. Use a Show Dialogue node to create menus (Choice dialogue type).

Mouse Down #

Started when a mouse button is pressed down while the curser is over the machine’s game object. It’s implemented in the component’s OnMouseDown function.

Additional Start Conditions #

The Mouse Down start type can optionally be limited by the distance between the player and the machine’s game object. This can be used to only start the machine when within a defind range.

The default maximum mouse click distance is defined in the Makinom editor (Base/Control > Game Controls > Interaction Settings) and can be overridden by each interaction machine individually. Setting the maximum distance to -1 will disable distance checks (the default distance is 3).

Example #

This start type can be used to mark a clicked game object. Use a Spawn Prefab node to spawn a cursor prefab on the game object or a Change Color node to change the game object’s color.

Mouse Drag #

Started when the mouse is dragged, i.e. while the button is held down after clicking on the machine’s game object. It’s implemented in the component’s OnMouseDrag function.

Additional Start Conditions #

The Mouse Drag start type can optionally be limited by the distance between the player and the machine’s game object. This can be used to only start the machine when within a defind range.

The default maximum mouse click distance is defined in the Makinom editor (Base/Control > Game Controls > Interaction Settings) and can be overridden by each interaction machine individually. Setting the maximum distance to -1 will disable distance checks (the default distance is 3).

Example #

This start type can be used to drag game objects through the scene by mouse. Use one of the Movement nodes (e.g. a Change Position node) to change the position of the game object – additionally, you can use a Raycast node to store the position of the mouse cursor in the scene into a Vector3 variable and use that to move the game object.

Mouse Up #

Started when the mouse is released after clicking on the machine’s game object. It’s implemented in the component’s OnMouseUp function.

Additional Start Conditions #

The Mouse Up start type can optionally be limited by the distance between the player and the machine’s game object. This can be used to only start the machine when within a defind range.

The default maximum mouse click distance is defined in the Makinom editor (Base/Control > Game Controls > Interaction Settings) and can be overridden by each interaction machine individually. Setting the maximum distance to -1 will disable distance checks (the default distance is 3).

Example #

This start type can be used to mark a clicked game object. Use a Spawn Prefab node to spawn a cursor prefab on the game object or a Change Color node to change the game object’s color.

Mouse Up As Button #

Started when the mouse is released while the cursor is over the machine’s game object after clicking on it. It’s implemented in the component’s OnMouseUpAsButton function.

Additional Start Conditions #

The Mouse Up As Button start type can optionally be limited by the distance between the player and the machine’s game object. This can be used to only start the machine when within a defind range.

The default maximum mouse click distance is defined in the Makinom editor (Base/Control > Game Controls > Interaction Settings) and can be overridden by each interaction machine individually. Setting the maximum distance to -1 will disable distance checks (the default distance is 3).

Example #

This start type can be used to mark a clicked game object. Use a Spawn Prefab node to spawn a cursor prefab on the game object or a Change Color node to change the game object’s color.

Mouse Enter #

Started when the mouse cursor enters the machine’s game object. It’s implemented in the component’s OnMouseEnter function.

Additional Start Conditions #

The Mouse Enter start type can optionally be limited by the distance between the player and the machine’s game object. This can be used to only start the machine when within a defind range.

The default maximum mouse click distance is defined in the Makinom editor (Base/Control > Game Controls > Interaction Settings) and can be overridden by each interaction machine individually. Setting the maximum distance to -1 will disable distance checks (the default distance is 3).

Example #

This start type can be used to mark a game object by moving the cursor over it. Use a Spawn Prefab node to spawn a cursor prefab on the game object or a Change Color node to change the game object’s color.

Mouse Over #

Started while the mouse cursor is above the machine’s game object. It’s implemented in the component’s OnMouseOver function.

Additional Start Conditions #

The Mouse Over start type can optionally be limited by the distance between the player and the machine’s game object. This can be used to only start the machine when within a defind range.

The default maximum mouse click distance is defined in the Makinom editor (Base/Control > Game Controls > Interaction Settings) and can be overridden by each interaction machine individually. Setting the maximum distance to -1 will disable distance checks (the default distance is 3).

Example #

This start type can be used to rotate a game object while the cursor is over it. Use one of the Rotation nodes (e.g. a Rotate node) to rotate the game object.

Mouse Exit #

Started when the mouse cursor leaves the machine’s game object. It’s implemented in the component’s OnMouseExit function.

Additional Start Conditions #

The Mouse Exit start type can optionally be limited by the distance between the player and the machine’s game object. This can be used to only start the machine when within a defind range.

The default maximum mouse click distance is defined in the Makinom editor (Base/Control > Game Controls > Interaction Settings) and can be overridden by each interaction machine individually. Setting the maximum distance to -1 will disable distance checks (the default distance is 3).

Example #

This start type can be used to remove the marking of a game object. Use a Destroy Object node to destroy a cursor game object or a Change Color node to change the game object’s color back.

Machines
Share This Article :
  • Facebook
  • Twitter
  • LinkedIn
  • Pinterest
Updated on December 16, 2020
Table of Contents
  • Start Types
    • Interact
      • Additional Start Conditions
      • Example
    • Key Press
      • Additional Start Conditions
      • Example
    • Mouse Down
      • Additional Start Conditions
      • Example
    • Mouse Drag
      • Additional Start Conditions
      • Example
    • Mouse Up
      • Additional Start Conditions
      • Example
    • Mouse Up As Button
      • Additional Start Conditions
      • Example
    • Mouse Enter
      • Additional Start Conditions
      • Example
    • Mouse Over
      • Additional Start Conditions
      • Example
    • Mouse 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!