Syntax: tiletype( float x, float y );
Description
Is used for checking what type of tile the player or a npc is on.
example:
function onWeaponFired() {
if (tiletype(player.x + 1.5, player.y + 2) == 3) {
player.chat = "I'm sitting!"
}
}
Checks if the player is on tiletype 3 (sit tile).
Tiletypes (can be use with setshape2)
| Value | Description |
| 0 | nonblock |
| 2 | hurt underground |
| 3 | chair |
| 4 | bed upper |
| 5 | bed lower |
| 6 | swamp |
| 7 | lava swamp |
| 8 | near water |
| 11 | water |
| 12 | lava |
| 20 | throw-through |
| 21 | jump stone |
| 22 | blocking |