Creation/Dev/Script/Functions/tiletype

From Graal Bible
Revision as of 20:18, 27 February 2011 by Deas Voice (talk | contribs) (→‎Creation, by Deas_Voice)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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