GetFloorTerrain

From ZDoom Wiki
Jump to navigation Jump to search
Note: This feature is for ZScript only.


Actor

native TerrainDef GetFloorTerrain()

Usage

Returns a pointer to the Terrain struct for the floor plane below the calling actor.

Examples

This actor (presumably, a projectile) will go to the "Splash" state sequence if it hit a floor terrain defined as liquid. Otherwise it'll explode and show the Doom rocket animation:

Death:
	TNT1 A 0
	{
		let t = GetFloorTerrain();
		if (t.IsLiquid && pos.z <= floorz)
		{
			return ResolveState("Splash");
		}
		A_Explode();
		return ResolveState(null);
	}
	MISL BCD 5 bright;
	stop;