ScriptUO

Official ScriptUO EasyUO Scripts => Script Debug => Topic started by: razeial on August 08, 2012, 01:31:53 PM

Title: Need pathfinding help!
Post by: razeial on August 08, 2012, 01:31:53 PM
Removed by request
Title: Re: Need pathfinding help!
Post by: TrailMyx on August 08, 2012, 01:55:49 PM
Are you walking or running when you record the rail?  you should always walk when you record, otherwise you'll get x,y,z values that don't match a real-world spot and you'll get that error.

Another key thing is to record your x-y-z locations on one line.  Like:

Code: [Select]

set %xyz #CHARPOSX , _ , #CHARPOSY , _ , #CHARPOSZ


Then when you are playing these spots back, you break this back up using the "_" to find the separation of each of the coords.

Why?  Well the way EUO works is there's a 20ms pause between lines of code if you are running with #LPC of 10 which is default.  So this is really what happens:

Code: [Select]
set %x #CHARPOSX
(wait 20)
set %y #CHARPOSY
(wait 20)
set %z #CHARPOSZ
(wait 20)

You see that in order to record this spot, you've actually had a chance to mess up your coordinates because you've had 60ms elapse.   But if you do it the way I show, all coords are recorded simultaneously from the perspective of your script.
Title: Re: Need pathfinding help!
Post by: razeial on August 08, 2012, 02:00:53 PM
Makes sense. I recorded the rail using RoadKill's Rail Recorder. I would run to one spot, stop, hit record on his script, then run the the next, stop, hit record, etc etc. If I ran that rail in despise with no spawn, it will run perfectly every time, its only when the spawn is actually going that I get the message.