kts.Swing – attack with melee weapon
kts.Swing()
result = kts.Can_Swing()
If the actor (cxt.actor) is a creature holding a melee weapon in their hands, and is currently able to attack with that weapon, then calling kts.Swing() will cause the actor to begin a melee attack.
kts.Can_Swing() will return true if the actor is a creature currently able to attack as described above, or false otherwise.
kts.Swing() returns nothing, and kts.Can_Swing() returns a boolean as described above.
This function can only be used to initiate melee attacks with a hand-held weapon (like a sword, hammer or axe). For example, it cannot be used to make vampire bats attack, and it cannot be used to initiate ranged attacks.
kts.Swing and kts.Can_Swing are useful as the action and possible functions of a Control, respectively.