Penguin Action Toolkit
  • 🐧Welcome
  • Guide
    • Step-by-Step Guide
      • Step 1: Install PAT
      • Step 2: Tutorial Scene
      • Step 3: Character - Action States
      • Practice 0: Add an Input Tag
      • Step 4: Character - Tags
      • Practice 1: Combo
      • Step 5: State Modifiers
      • Practice 1.1 & Ex: Grant Tag Mod
      • Step 6: Animation Montage
      • Step 7: Trigger Animation Event
      • Practice 1.2: Back to Grant Tag Mod
      • Step 8: Animator
      • Step 9: Attributes
      • Practice 2: Cost HP
      • Step 10: Effects
        • Step 10.1: Hitbox & Hurtbox
  • Definition & Inspector Detail
    • Actions
      • Action State
      • State Modifier
      • Move Set
    • Tag
    • Attribute
    • Effect
    • Player
    • Input
    • Locomotion
  • Tutorial
    • Installation
    • Contents of the Assets
    • Character
      • Create a Character
    • Set Up Player
    • Create a new Tag
    • Create a new Modifier
    • Use Attributes
    • Effect
      • Create an Effect
      • Apply Effects
    • Animation
      • Animatior Controller
    • PAT Manager
  • Beneath the Feathers
    • The Other One
    • Help on the Way
    • Victim or the Crime
    • Unbroken Chain
  • PAT Game Jam
    • Save the Penguin
    • Schedule
    • Terms & Conditions
  • FAQ
    • Change to Your Own Model
Powered by GitBook
On this page
  • Review
  • Tag System
  • Inspector
  • Further Reading
Edit on GitHub
  1. Guide
  2. Step-by-Step Guide

Step 4: Character - Tags

PreviousPractice 0: Add an Input TagNextPractice 1: Combo

Last updated 6 months ago

Goal

  • Understand Tag System and how it forms a State Machine

Review

So far, you've learned how Input Tags are used to trigger Action States and allowed the penguin to attack. However, you may wonder how different Action States could be triggered by the same Player Input (i.e. A light attack combo all triggered by left clicking). They are using the same input but should be different Action States. How do I control which State to trigger?

In this Step, we will discuss the Tag System and the Dynamic State Machine in Penguin Action Toolkit.


Tag System

In PAT, Tags serve as tickets for the character to enter different Action States. Action States are triggered by corresponding Input Tags, but they also request a list of Require Tags in order to be entered. If they cannot find the required tags in , the Action State cannot be entered.


Inspector

  • Require Tags

    After receiving the corresponding Input Tag, State A will check if the character is currently holding the Required Tags before entering. If not, nothing will happen.

    • The relationship among outer Elements is logical disjunction (or).

      As long as one element has all of its requirements fulfilled, this is considered to be true, and the State can be entered.

    • The relationship among inner Elements is logical conjunction (and).

      All requirement tags must be present, or the "no requirement" box is checked for this element to be considered true.

You can add new Tags into the Require Tags of Attack1, and you will find the penguin unable to attack again.

After entering the Action State, the State will also grant tags to the character. All tags in the Main Tags field will be added to the Tag Container.

  • Main Tags Tags a character will hold if it is in this State

Apart from the things we mentioned, there are other usage of Tags to control state transitions. You can find the following fields in the inspector of Action State components.

  • Prohibit Tags If another State tries to enter when character is in State A, and at least one of its Main Tags is listed in State A’s Prohibit Tags, it cannot be entered.

  • Self-Prohibit Tags If the character is in another State and is currently holding any Tag listed in State A’s Self-Prohibit Tags, State A cannot be entered.


Further Reading

You may find full documentation on Action State's inspector details by the following link. It is quite useful when creating your own Action State.

Action State
Tag Container
Attack1 requires character to have Idle Tag