PerformShadowChecks
Jump to navigation
Jump to search
Note: This feature is for ZScript only. |
bool, Actor, double PerformShadowChecks (Actor other, Vector3 pos)
Usage
Returns information related to whether or not the callers' aim should be affected by Other having SHADOW (If they do have it), or, if DOSHADOWBLOCK is on, what SHADOWBLOCK actor is in the way, if any, and how it should affect their aim.
Parameters
- other: The actor the check is looking for, i.e the actor the caller is aiming for. This parameter CAN be null, and if it is, the function will just check for any SHADOWBLOCK actors that are in the line of fire of the caller.
- pos: Where the check trace (For SHADOWBLOCK actors) should be fired from, these are absolute coordinates. And allow for checking for shadow blockers from a specific firing position.
Return value
Returns 3 values:
- Did the check find ANY kind of SHADOW or SHADOWBLOCK actor at all? If not, returns false.
- A pointer to the shadow actor the check found, shadow blockers take precedence, so if one was in the line of fire, they'll be returned instead of Other, even if the latter has SHADOW.
- The ShadowPenaltyFactor of the actor returned by the second return. Again, shadow blockers take precedence over the Other actor.
Examples
![]() |
Note: This article lists no examples. If you make use of this feature in your own project(s) or know of any basic examples that could be shared, please add them. This will make it easier to understand for future authors seeking assistance. Your contributions are greatly appreciated. |