• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Problem with getThingFromPos

TGYoshi

In space
Joined
Aug 20, 2010
Messages
1,107
Reaction score
121
Location
In space
I'm trying to use 'getThingFromPos', however, the result doesn't work as I want it to work :p.
I got it working properly after some ages puzzeling around, but now I've got a problem I don't know the 'cause' of.

I'm using 'getThingFromPos' on some position with a floor and a wall. If I use getItemName on the found thing from getThingFromPos, I always get the name of the floor, and I want the name (uid) of the wall.
Let's say, the most upper thing on the tile.

I messed around with stackpos, but that didn't help a lot.

Any suggestions?
 
Umg thanks, it works :D.
Mmm I kept trying 2 -.-. Thought 1 was the ground.

Edit: What's the stackpos for players/creatures. Probably need that soon.. Thanks :D.
 
253 is top creature, creatures deeper down in the stack can have any stackpos higher than 1

it's recommended to use getTopCreature(pos) for this, not getThingfromPos
 
Back
Top