Log in

View Full Version : Anyone have any clue..?



DragonsBreath
02-19-2016, 02:58 AM
Greetings!

So, I'm new at Xenobot. But I'm starting to get it down with scripts and such.. or somewhat. Can someone lend me a hand in helping me figure out how to make it so when my character reaches level 20, for instance, it will go to the label in walker called "Lowerfloor"?

Probably a newby question, but I can't figure it out for the life of me, and search results aren't helping too much. xD

Anyway, thank you for your time and help! :D
-DB

My attempt at scripting this:


registerEventListener(WALKER_SELECTLABEL, "onWalkerSelectLabel")

function onWalkerSelectLabel(labelName)

if (labelName == "Checklevel") then
if (Self.Level() >= 20) then
Walker.Goto("Lowerfloor")
print([[Moneytime!]])
else
Walker.Goto("Start")
print([[Not quite!]])
end
end
end

DragonsBreath
02-19-2016, 04:57 AM
Finally figured it out on my own, and what I was doing wrong.

Thanks anyway. I put my results in the first post for anyone else having the same problem, because I know how frustrating the simple things can be when you can't find any help online (because it's simple, no one else has the same problem xD)

This can be closed!

playmate
02-19-2016, 11:17 AM
Nice that you figured it out on your own - and great that you printed it out. =)

Well done! And a very smart feature.