CheckActorFloorTexture

From ZDoom Wiki
Jump to navigation Jump to search

bool CheckActorFloorTexture (int tid, str texture)

Usage

Returns true if the floor texture of the sector the calling actor is in matches the name in the string of the ACS function. If tid is 0, it uses the activator. For animated textures you only need to check for the base texture.

Parameters

Return value

Returns true if the floor texture of the sector the calling actor is in matches the name in the string of the ACS function, false otherwise.

Examples

This script simply checks to see if the floor texture is grass and prints a message accordingly.

if (CheckActorFloorTexture(0, "GRASS1"))
    Print (s:"You're on grass!");
else
    Print (s:"You're not on grass.!");

See also