Fungus Trigger

Fungus Trigger allows you to place triggers in a 2D or 3D game world that trigger Fungus dialogue to appear and that transition control back to the game when dialogue ends.

Set up the project

  1. Create a new empty project.
  2. In Window / Asset Store.
  3. Search for Fungus.
  4. Download and import Fungus.

Make the FungusTrigger script

  1. Project / Create new C# Script.
  2. Rename it FungusTrigger.
  3. Double click it to edit it. Delete all the code.
  4. Copy the FungusTrigger.cs source code from pastebin.
  5. Paste the code into the script text editor.

Make the Fungus Trigger object

  1. Hierarchy / Create / 3D Object / Cube.
  2. Rename it “Fungus trigger” and hit return.
  3. Inspector / Collider / isTrigger = true (check the checkbox).
  4. Place the FungusTrigger script on the cube.

Make a flowchart in Fungus

  1. Tools / Fungus / Create Flowchart
  2. A Flowchart pops up in the Inspector.
  3. Click Open Flowchart Window in its inspector.
  4. Drag the resulting window to dock it alongside the Scene and Game tabs.
  5. It starts with a blue New Block.

Make the Fungus story block display a message

  1. Select it.
  2. Inspector / Execute On Event / Scene / Message Received
  3. Set it to “post touched”
  4. At bottom of inspector is a + button that adds a command to this block.
  5. + / Narrative / Say
  6. Story Text = “You have touched the trigger and displayed this message”


Leave a Reply

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

You are commenting using your 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