attacking
Details
Kode wheel segment | Combat/Combat Events |
Style | Specialised |
Modifiers | light, medium, heavy, swing, windup, recovery |
Primarily WHEN/DO | WHEN |
Pre-made brains that use it | Unknown |
Combat > Combat Events > attacking
Description
This tile is a Boolean variable. It senses when a character is attacking using melee (not ranged). Can be used to affect a player visually so that they look different when attacking, or apply other actions.
Example Code
This will put an Exclamation point above their head as they punch
WHEN [attacking] DO [display][icon:Exclamation point][above]
This example will make the character bigger every time they punch
WHEN [attacking] DO [scale][=][1.5]
…WHEN [else] DO [scale][=][1]
Place a water faucet effect in your world. Colour it red. Make it a template.
In your player brain
WHEN [attack hit] DO [objvar:my enemy][=][it]
WHEN [attacking][recovery]
…WHEN DO [play fx][IWP:faucet][on][objvar:my enemy]
This will create a blood effect on the enemy during the recovery period of your attack.
Modifiers
light: Senses only light attack hits
medium: Senses only medium attack hits
heavy: Senses only heavy attack hits
swing: Senses when the attack swing starts
windup: Senses when the windup (arm pulls back before the punch for example) starts, if windup is used
recovery: Senses the start of the recovery period (after the melee attack is complete)
Other Uses
None