throw_parry

This component allows a mob/living to parry thrown objects back towards its source provided certain conditions are met. COMSIG_PARRY_TRIGGER together with a duration enables parrying for this time frame, durations do not stack and only the current latest ending one is used. A thrown item being parried will prevent the throw from ending and returns said thrown object back towards its source with half its speed.
Vars | |
living_parent | The mob/living this component interacts with, namely reacting to attempted throw impacts on it. |
---|---|
parry_until | Until which world.time the parry is active. Parries can only trigger if this is larger than the current world.time. |
Procs | |
enable_parry | Enables parrying for the passed duration. Multiple sources of enabling will not be directly summed up, instead using the latest ending one. |
parry_check | This is triggered by an object attempting to impact into something with the parry component attached and checks whether the current conditions are valid to trigger a parry success. The mob has to be conscious aswell as not resting and the parry duration must not have timed out. |
Var Details
living_parent

The mob/living this component interacts with, namely reacting to attempted throw impacts on it.
parry_until

Until which world.time the parry is active. Parries can only trigger if this is larger than the current world.time.
Proc Details
enable_parry
Enables parrying for the passed duration. Multiple sources of enabling will not be directly summed up, instead using the latest ending one.
parry_check
This is triggered by an object attempting to impact into something with the parry component attached and checks whether the current conditions are valid to trigger a parry success. The mob has to be conscious aswell as not resting and the parry duration must not have timed out.
- Returns TRUE on successful parry and nothing if failed, which is then handled by throwing code.