Action Restriction Node

From EVERYWHERE wiki
Revision as of 08:12, 7 May 2024 by User (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Action Restriction Node

The `ActionRestrictionNode` is a module that manages all items of the type 'ActionRestrictionNode' within a game. It primarily deals with setting and modifying the available actions and movements a player can perform in the game. Its key features and options include:

  • Restrictions on the number of jumps a player can make.
  • Option to allow or disallow the use of a backpack.
  • Controls on whether a player is allowed to 'Sprint', 'Mantle', 'WallRun', 'Evade', 'Aim', and 'Hipfire'.
  • These settings apply both globally and on a per-player basis.

Usage

`ActionRestrictionNode` comes with a set of default action restrictions, that can be overridden or altered as per requirement.

  • The basic usage involves placing this node within your game editor, and configuring the action restrictions as needed.
  • Restrictions are applied via the `ModuleLogic` when the item is activated for a player or globally.
  • Equally, upon deactivation, the restrictions are reverted to the default settings.
  • The `PlayerId` option allows targeting specific players for applying or removing restrictions.

Examples

Restricting Sprint and Jumps for a Player

To restrict a specific player from sprinting and allow them only 1 jump, the `ActionRestrictionNode` can be configured as:

  • Set `PlayerId` to the Id of the desired player.
  • Activate the node for the player with settings:
    • `Jumps` set to `1`.
    • `Allow Sprint` set to `False`.

Global Restrictions

A scenario where all players are restricted from using Backpacks and are allowed only 2 jumps can be configured as:

  • Activate the node globally with settings:
    • `Jumps` set to `2`.
    • `AllowBackpack` set to `False`.

Reverting Restrictions

Reverting any restrictions applied can be achieved by deactivating the node for a specific player or globally, as per the situation. Deactivation automatically reverts the settings to default.

Please note, `ActionRestrictionNode` checks for validity at each step, ensuring that any applied restrictions are valid and actionable. It responds accordingly when a player joins or leaves the game.