For the complete documentation index, see llms.txt. This page is also available as Markdown.

Messages

Objects can send and receive messages to create an interactive experience.

What are Messages?

Messages

Messages are signals used to create a flow of logic between players, objects, and quests. An action triggers a message to be sent, leading to one or more outcomes.

Behaviours and components are bundled logic designed to listen for and broadcast messages.

Example:

A player's action of pressing the E key in front of a door sends the message Interact, and the door opening is the outcome.

Tags

Tags are identifiers attached to objects, making it easy to send a message precisely when needed.

Example:

Say you want to change the weather to a specific setup, but have multiple weather objects in the same area that are listening for the same message. Set the message to go to SpecificTagsInRange, add the tag you want to send it to, and apply the tag to the Weather Switcher object you want to receive the message.

Using Messages

Some behaviours and components listen for one or several messages to be received. Some allow one or several messages to be sent.

There are many ways to use Game Maker's logic tools to create one or more outcomes from an action. You can create short or long strings of events, and you can also create branching logic that gives players more choice or includes random events that influence other outcomes.

Default Messages

Pressing the E key when standing next to an object sends the default message Interact.

When you apply a Door behaviour to an object, by default the object will listen for the message Interact and plays an open animation as an outcome.

If you open the Message required dropdown list in any behaviour or component, you'll see there are other default messages that exist in every Experience you create.

Some of these defaults are automatically bundled into an object's properties (along with default tags) when a behaviour or component is applied. This allows for fast functional gameplay.

Default tags and messages can be changed to create customised interactions and unique gameplay mechanics.

Example:

You can create factions of soldiers fighting in a battle by changing their Tags to Attack and applying the same tag on every object considered to be their enemy.

Some default messages will need to be changed to customise your Experience logic.

Special Messages with Arguments

Special messages with arguments are used to transition light, sound, and camera effects.

In the message dropdown box of a behaviour or component, select a special message with arguments (yellow text). A parameter will appear to customise the timing, colour, etc.

Play Sound Component

Audio Pause - Fade the audio it is playing to pause. Audio Play - Fade the audio it is NOT playing to play. AudioStop - Fade the audio it is playing to stop. SoundVolume - Set audio volume for an object to blend audio.

Light Component

LightColor - For a target object with Light Behaviour, fade between the current light setting to a colour chosen in the message's arguments.

Post Process Effects Behaviour

PostProcessFade - For a target object with Post Process Effects Behaviour, fade between the current effects setting to the target object's setting.

Weather Switcher Behaviour

WeatherFade - For an object with Weather Switcher Behavour, fade between the current weather setting to the target object's setting. Weather changes override defaults set in the Ambiance tab of the Gameplay menu.

Buff/Debuff Messages with Arguments

There are five default messages available with blue text that are special messages with arguments that trigger buffs/debuffs:

  • Attack Power

  • Damage Resistance

  • Health

  • Oxygen

  • Speed

Use positive or negative numbers to increase or decrease these values. Note that these do not stack, and oxygen and health do not exceed the maximum value.

Custom Messages with Arguments

Any new message can be created as a normal message or a message with arguments. If you create an argument, you can send additional information with the message, set in the logic from which you send the message. You can also name the argument.

Example: Collectable Objects Awarding Points (Collect Points Rules Preset)

The message triggers a rule that awards players points, and each collectable object can specify a different amount of points in the argument to add to your score when the items are collected.

Messages can be directed in a variety of ways to customise logic. Learn more

Managing Messages

By default, setting the message to ‘none’ is the same as setting a message to empty.

Use an Existing Message

To use an existing Message in a behaviour or component's logic, click the Message Required dropdown and begin typing in the name of the message you wish to use. The list will populate with all the existing related messages. Click a message in the list to select it.

Create a Custom Message

To create a new message to use in a behaviour or component's logic, click ADD+ if no message is applied yet or click on the existing message.

This will open a dropdown list of existing messages. Begin typing the message you wish to add. Click the green text ADD 'your message' to apply it.

Remove a Message from an Object's Logic

To remove a message from a behaviour or component, click the X to the right of the message.

Delete a Message from the Experience's Message List

In the top right corner of Game Maker, click on the gear icon to open Settings. There you will be able to access a list of all messages included in your Experience and delete any custom messages you've created.

Last updated

Was this helpful?