Posted: Mon Oct 15, 2007 8:48 am Post subject: GetStandingHeight & CreateNpcFromTemplate [097 RC5]
From docs
Quote:
GetStandingHeight( x, y, startz, realm := _DEFAULT_REALM )
Gets the lowest z height value one could stand at x,y starting at "startz".
There's something wrong in latest core with standing layers detection: this function returns also lower z than startz.
Using
Code:
GetStandingHeight(who.x, who.y, who.z, who.realm)
when who is on a boat at z -4, returns z -85 (a submarine dungeon).
CreateNpcFromTemplate() also creates NPCs in the submarine dungeon when I use it with the (map) sea z (-5), and creates NPCs on the ground (z 0) when used in an undermap tunnel (z -25) if subterrain location is blocked: it seems that CreateNpcFromTemplate() doesn't return "Not a valid location for an NPC!" when there is another valid layer in same x&y, even at very different z.
Walking (and running) functions can move NPCs at impossibile locations: moving NPCs toward coasts make them walk on (static) sea bed even if there is a layer of impassable and LoS-blocking tiles between surface and deep.