Log in

View Full Version : check position



kubax36
09-05-2012, 10:37 PM
elseif (labelName == "checkpos1") then
delayWalker(2000)
if(pos.x == 33237 and pos.y == 31412 and pos.z == 8) then
gotoLabel("go1")
setTargetingEnabled(true)
else
gotoLabel("p1")

can someone tell me whats wrong with this script plx? :D

Spectrus
09-05-2012, 10:57 PM
You've posted a snippet, it's hard to see what else you've got. Anyways, my guess would be that you're using a variable called pos. It's not defined anywhere in that snippet, so maybe that's the problem.

Try replacing pos with Self.Position(), so it would be


if(Self.Position().x == 33237 and Self.Position().y == 31412 and Self.Position().z == 8) then

kubax36
09-06-2012, 02:14 PM
it was the problem, thanks you! :)