💥Components, Actions & Events

Welcome to the world of components!

Components are special actions you can add to any object in the game in order to create logic, or mechanics, using Linking.

When it comes to linking, each component has a set of unique instructions referred to as "Actions & Events."

  • "Actions" are what need to happen to trigger an event - interacting with an item; entering a certain area; after 5 seconds has passed, etc.

  • Events" are what happens in response to the action - the player has entered, so the door locks; 5 seconds have passed, so now the object will start moving over here, etc.

These are what make up the game's "if X happens, I do Y."

Easy, right?

In Linking Mode, any object that has a component will have a little orange square hovering at its centre. When you click on the square, it will expand and highlight the whole entity - this is especially useful if an entity is hidden inside another entity, like spikes hidden underground before they are activated to shoot up and trap an unwary player.

When the orange square expands, there will be a little + on its right hand side. To begin a new link, click it and a list of all the possible Actions this object can perform (based on what components it has attached) will appear.

Select whatever Action you want to be the triggering factor, and now a little spaghetti noodle should be attached to your mouse. You can now drag this onto any other orange box, OR back onto the original object (by clicking the little round arrow on the top right corner of the selection box) to create a self-link 🔄

Complete the link by selecting the Event. The line should now go rigid and have a little red circle in the middle of it. Clicking this will open a drop-down of all the links between these two objects. Clicking one of these in the drop-down will delete the link you just clicked. An object with a self-link will have the red circle appear within the orange box.

Links can also be made from entities onto Player and Game Components, for actions you want to affect more than just the worldspace, like losing health or respawning.

Eventually, your links may look something like this...

Each component has a set list of Actions and Events they are both capable of, but these can be mixed around and played with for all kinds of different results.

For example, a Mover component's set list of Actions and Events are:

ACTIONS

  • Stopped moving

  • Started moving

  • Reached start position

  • Reached end position

EVENTS

  • Move

  • Stop moving

  • Move forward

  • Move backward

  • Teleport to start position

  • Teleport to end position

  • Toggle start/stop moving

Last updated