|
Project Zomboid Lua Docs 29123
Unofficial documentation for Project Zomboid's Lua
|
(Client) Attack: Called every tick while a local character is pressing their attack button and is able to attack.
Parameters
| Name | Type | Notes |
|---|---|---|
| attacker | IsoLivingCharacter | The character attempting to attack. |
| chargeDelta | number | |
| weapon | HandWeapon |
(Client) AutoDrink: Called whenever a character automatically drinks while auto-drink is turned on.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoGameCharacter | The character auto-drinking. |
(Client) CalculateStats: Called when a character's stats are being updated. Character health is not included.
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoGameCharacter |
ContextualAction:
Parameters
| Name | Type | Notes |
|---|---|---|
| actionType | string | |
| character | IsoGameCharacter | |
| object | any | |
| arg1 | any | |
| arg2 | any | |
| arg3 | any |
WeaponHitCharacter: Called when the effects of an attack are being calculated.
Parameters
| Name | Type | Notes |
|---|---|---|
| attacker | IsoGameCharacter | |
| target | IsoGameCharacter | |
| weapon | HandWeapon | |
| damageSplit | number |
WeaponSwing: Called when a weapon is swung to find targets
Parameters
| Name | Type | Notes |
|---|---|---|
| character | IsoGameCharacter | |
| weapon | HandWeapon |