Hosting and domain costs until October 2024 have been generously sponsored by dumptruck_ds. Thank you!
Difference between revisions of "checkbottom"
From Quake Wiki
m (Move page script moved page Checkbottom to checkbottom: Fixing the case) |
|||
Line 1: | Line 1: | ||
− | + | ''float'' '''checkbottom'''(''entity'' e) | |
− | |||
− | + | == Usage == | |
− | + | Checks if the entity is currently on the ground. This will be considered true if the entity is up to 18 units off the ground, their maximum step height. Note that all corners of the entity's bounding box must be on ground. | |
− | Returns TRUE if on the ground. | + | === Parameters === |
− | + | *''e'' | |
+ | :The entity to check. | ||
+ | |||
+ | === Return === | ||
+ | Returns <code>TRUE</code> if the entity was on the ground. | ||
+ | |||
+ | == Example == | ||
+ | // This monster only does a leap attack if it's on the ground | ||
+ | if (checkbottom(self)) | ||
+ | DoLeapAttack(); |
Latest revision as of 12:50, 1 August 2023
float checkbottom(entity e)
Contents
Usage[edit]
Checks if the entity is currently on the ground. This will be considered true if the entity is up to 18 units off the ground, their maximum step height. Note that all corners of the entity's bounding box must be on ground.
Parameters[edit]
- e
- The entity to check.
Return[edit]
Returns TRUE
if the entity was on the ground.
Example[edit]
// This monster only does a leap attack if it's on the ground if (checkbottom(self)) DoLeapAttack();