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.
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
Uploading custom content for use with Video and Audio Streaming behaviours is limited to The Sandbox and select partners. These features are in development for public use.
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.
Game Maker 0.9's new buff/debuff system replaced Heal and Damage messages.
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.
Managing Messages
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.

Last updated
Was this helpful?



