Too Many Attributes
» Entity actions » Force key pressed

Force key pressed

too-many-attributes:force_key_pressedentity action

Holds a key down on the target.

FieldTypeDefaultDescription
keyString"key.origins.primary_active"The keybind id.
durationInteger1Ticks to hold it. 1 is a single press.
releaseBooleanfalsetrue lets go of a key an earlier call is holding.
  • On a player it's a real press on their game, so it does what that key does: walking, jumping, attacking, Origins' power keys, other mods' keybinds. The player can still press other keys.
  • On any other entity it runs the entity's own key-bound Origins powers, like origins:active_self, and counts for action_on_key_sequence.
  • Forcing a key that's already held makes it last until the longer of the two times.
  • From Overgrown's Apoli: the fields match.

Example: "Puppet". Hitting a player makes them jump for a second.

json
{
  "type": "origins:action_on_hit",
  "bientity_action": {
    "type": "origins:target_action",
    "action": {
      "type": "too-many-attributes:force_key_pressed",
      "key": "key.jump",
      "duration": 20
    }
  },
  "cooldown": 100
}