top of page
James Burke

Narrative Game #5 - Dialogue System & Interactive Objects

What are basic mechanics for this narrative game? Let me list them:

  • Player that can walk (up/down/left/right; because this is a top-down perspective game)

  • Interaction with special objects

  • Dialogue system


So far, I have a player that can move in all directions! Now, they don't exactly look like our character (an inspector) but this is just a placeholder! Note that I have put a bush here- it is a special object that the player can interact with (it is made so that its appearance can be changed to anything, the bush sprite is used as an example).

The player must get close to the bush as a precursor to interaction. The log shows when the player is within the special object's bounds.

When the player presses 'E', this triggers an event accociated with the special object. In this case, and in most cases, this will be a dialogue event. A box appears, showing the name of what the player is interacting with, as well as some dialogue.

Objects can have more than one block of dialogue.

When there is no more dialogue, the box dissapears after the player presses 'E' again.


To quickly brush over how this works:

This is the prefab for the special object. Attached are components which allow for it to be interacted with- the player can press 'E' to trigger an event related to the object.


By default, I have attached a dialogue handler component. This contains the name and blocks of dialogue related to the object. This comes from my custom class 'Dialogue'. This script communicates with the dialogue manager object of the scene.








The dialogue manager is meant to be a singleton (only one exists in the scene) which takes care of the displaying of the text that it is supplied. It takes references to dialogue-related UI elements.


Recent Posts

See All

Unity VR #0 - Configuration

A beginning to VR development with Unity, I look to produce a 'template' project configured for VR development without having a headset.

Комментарии


bottom of page