• 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!

How do you detect an invalid item tile? IsMoveable not working. Rep! =)

rockseller

Lua & .NET Programmer
Joined
May 10, 2008
Messages
159
Reaction score
9
Location
México
I'm trying to make a teleporting spell, i'm using the following:

Thing = getThingFromPos(pos)
which gets me Thing.uid
which then i use IsMoveable(thing.uid), but this isn't returning true nor false.


is there another way to detect something like a Tree? Or a brush tree, like, if there is an object where you can't stand ( A WALL ), you cant teleport?

Help will be much appreciated, thanks.
 
try search function isWalkable i saw it here
here it is
Lua:
function isWalkable(cid, pos)
	pos.stackpos = 253
	if (doTileQueryAdd(cid, pos) == 1 and getTilePzInfo(pos) == FALSE and isCreature(getThingFromPos(pos).uid) == FALSE) then
		return TRUE
	end
	return FALSE
end
 
Last edited:
Lua:
function isWalkable(pos)
	pos.stackpos = 0
	return not hasProperty(getTileThingByPos(pos).uid, CONST_PROP_BLOCKSOLID)
end
 
Thank you guys for the replies, trying this once i get home!, i rep'ed damadgerz, because i already rep'ed Cykotitan not too longo ago so can't rep =) Thank you both, ill try this ASAP
 
Back
Top