Hivemind
  • πŸ”Start Here
  • πŸ’»Code Systems
    • 🐎Ultimate Horse System
      • Documentation
      • Integration Guide
    • πŸš€Ultimate Spaceship System (USS) Knowledge Base
      • πŸ“–USS Documentation
      • 🧩USS Integration Guide
    • πŸš‚Ultimate Train System
      • Dokumentation
      • Integration Guide
    • βš”οΈModular Character System
      • Documentation
      • Trailer
    • βš’οΈUltimate Building System Framework (UBS)
      • πŸ”Introduction
      • Installation
        • Example Content Setup
      • Developer Settings
        • Initial Setup
        • Collision Channels
      • Quick Start
      • Ultimate Building System Component (UBS)
      • Buildable Definition
      • Buildable
        • Actions
        • Tag Qualifier Conditions
        • Dependencies
      • Proxy Behaviour
        • Trace Behaviour
        • Proxy Location Offset
        • Placement Conditions
        • Post Build Events
      • Using your own Meshes
      • Global Function References
  • ✨VFX
    • 🩸Realistic Blood VFX
      • Documentation
      • Video Tutorial
    • 🩸Stylized Blood VFX
      • Documentation
    • πŸ’₯Realistic Gun Effects
      • Documentation
    • ☁️Smoke & Fog VFX Knowledge Base
      • πŸ“–Smoke & Fog Documentation
      • πŸ“ΈVideo Tutorials
  • 🏑Environments
    • πŸŒƒ Cyberpunk City
      • Level Instance
      • Tech Tools
    • 🏰Modular Castle & Dungeon
      • Documentation
      • Trailer
    • 🏘️Modular Rural Town
      • Documentation
      • Trailer
Powered by GitBook
On this page
  • Callable Functions
  • Overridable Functions
  • Example
  1. Code Systems
  2. Ultimate Building System Framework (UBS)
  3. Buildable

Actions

An action is a modular system that lets you enhance your buildables by adding extra functionality, making them more dynamic and versatile. You can assign and combine multiple actions to any buildable, allowing for greater flexibility in how they behave and interact within the game world.

Callable Functions

  • GetOwnedGameplayTagsTags() This allows you to get the tags which defines this Action. When you want to try and find a specific action.

  • ExecuteAction() This executes the logic of this action.

  • IsActionAvailable() This needs to return true for the action to be executed. This allows you to set up conditions for when this action can be executed.

  • GetDisplayText() Gets the text for this action.

  • GetDisplayIcon() Gets the icon for this action.

Overridable Functions

  • ExecuteAction() This is where you will be putting your logic for this Action. Not overriding this will result in the action doing nothing.

  • IsActionAvailable() You can override this to make actions conditional. If this returns false then GetAvailableActions() in the Buildable won't return this action.

  • GetDisplayIcon() If you need more advanced behavior for getting the Action Icon, then override this.

  • GetDisplayText() If you need more advanced behavior for getting the action text, then override this.


Example

With actions you can create interesting behavior for your buildables.

An example of this would be creating a door with multiple actions: a toggle door action, a move action, and a destroy action. In this case, we want the toggle door action to be the default, so the player can simply walk up and interact with the door to toggle its open state.

To achieve this:

  1. Add the Default Action Tag

    • Create a Door Buildable Definition.

    • Add the tag Action.Default to the toggle action.

    • This allows the system to recognize the toggle as the default action.

  2. Interact with the Door

    • With the default action set, we can easily find and execute this action by doing a short interaction on the door itself.

    • We do this by opening the BP_Openable class, in here we set the short interaction to query for the default action.

NOTE: You don't have to use the Action.Default tagβ€”it can be any tag assigned to the action as long as you've assigned it to the aciton you're querying for. The Action.Default tag is just a generic way to mark an action as the default, so you don't need to update your code elsewhere to accommodate default actions.

  1. Access the Radial Menu

    • The player can also open the radial menu through a long interact on the door and choose from the available actions, including the default toggle action.

    ![Image showing the radial menu with different door actions]

PreviousBuildableNextTag Qualifier Conditions

Last updated 6 months ago

πŸ’»
βš’οΈ
Buildable Definition Details Panel
BP_Openable Buildable Example Actor (TODO: Update image when Execute Action has been upated with new input parameters)