HitWater
Jump to navigation
Jump to search
Note: This feature is for ZScript only. |
bool HitWater (Sector sec, Vector3 pos, bool checkabove = false, bool alert = true, bool force = false)
bool HitWater (Sector sec, Vector3 pos, bool checkabove = false, bool alert = true, bool force = false, int flags = 0) (development version 12d1afc only)
Usage
Checks if the given sector has liquid terrain. If so, spawns a splash at the position.
Parameters
- sec - The sector to check.
- pos - The 3D position to check at. This is not relative to the Actor. Also spawns the splash at this location.
- checkabove - False by default. If true, don't spawn the splash if the position is above the center of the Actor.
- alert - True by default. If true, non-small splashes will alert enemies.
- force - False by default. If true, check the terrain for the specified sector and ignore any 3D sectors that belong to it.
- flags - The flags that modify the behavior of the function. More flags can be added with the | separator. (development version 12d1afc only)
- THW_SMALL: Always spawn the terrains' small splash, if there's one. Otherwise, the function will only spawn a small splash if the callers' mass is below 10.
- THW_NOVEL: Spawn a splash even if the actor has no velocity. Otherwise, the function will only make splashes for players and monsters if they've at least got a vertical velocity of -6.
Return value
Returns true if the sector has liquid terrain.
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. |