Table of Contents

New Trigger Block

What is a Trigger Block?

The Trigger Block is a new trigger system that lets you easily view your code scripts using a block-based display. It makes creating fun and interactive games much easier, especially for eager developers of all skill levels! With this system, you can add more features and provide exciting feedback to players.

Let's Learn!


Types of Blocks: Different Purposes, Different Colors

Blocks in this system come in different colors, and each serves a unique purpose. Here's a quick overview to get you started:

If you're new to this kind of block system, it might seem a bit overwhelming at first. But don't worry! This article will guide you step-by-step to help you understand everything.


Explanation of Each Block and How to Use

1. Event Blocks (Light Blue)

Event blocks are the starting point for your game logic. They are used to detect events, such as a player pressing a button, touching an object, or something happening in the game.

Single Trigger Event Multiple Trigger Event
  1. Example Use: “When the player presses 'A', trigger an action.”
  2. How to Use: Drag an Event Block into the workspace and connect it to other blocks like Actions or Conditions to define what happens when the event occurs.

2. Condition Blocks (Green)

Condition blocks check whether something is true or false before deciding what to do next. They are essential for adding logic to your game.

  1. Example Use: “If the player's health is less than 50, display a warning message.”
  2. How to Use: Connect Condition Blocks after Event Blocks and use them to evaluate certain conditions. Pair them with Action Blocks to decide what happens when the condition is met.

3. Action Blocks (Dark Blue)

Action blocks perform tasks or actions in the game, such as playing a sound, moving an object, or changing a value.

  1. Example Use: “Move the character 10 steps forward” or “Play a sound effect.”
  2. How to Use: Connect Action Blocks after Event or Condition Blocks to execute specific tasks.

4. Value Blocks (Cyan)

Value blocks store or represent data, such as numbers, strings, or variables. They are often used as inputs for other blocks.

  1. Example Use: “Set the player speed to 10” or “Display the text 'Game Over'.”
  2. How to Use: Attach Value Blocks to other blocks that require input, like Action Blocks or Variable Blocks.

5. Control Blocks (Yellow)

Control blocks manage the flow of your game logic. They include loops, wait commands, and conditional branching.

  1. Example Use: “Repeat this action 5 times” or “Wait for 3 seconds before continuing.”
  2. How to Use: Use Control Blocks to organize and optimize how actions and conditions execute in your game.

6. Variable Blocks (Orange)

Variable blocks allow you to create and manage variables to store information, like player health, scores, or inventory items.

  1. Example Use: “Set 'Player Health' to 100” or “Increase 'Score' by 10.”
  2. How to Use: Define variables, then connect them to Value or Action Blocks to read or change their values during gameplay.

7. Custom Blocks (Pink)

Custom blocks allow you to create your own blocks, combining multiple tasks into one reusable block. They help simplify complex scripts.

  1. Example Use: “Create a block that plays an attack animation and reduces enemy health.”
  2. How to Use: Define a Custom Block by combining other blocks into a group, then reuse it anywhere in your script.

Tips for Beginners

If you're unsure how to start using these blocks:

The more you practice, the more natural it will feel. Try creating small, simple scripts first and then build up to more complex game logic. You'll be surprised at how much you can accomplish!