Code: Select all
<onLoad>
__WPL:setWaypointIndex( 1);
</onLoad>
How do I make the script start at waypoint 1 no matter what waypoint it thinks is closer?
Code: Select all
<onLoad>
__WPL:setWaypointIndex( 1);
</onLoad>
Use something like the following :randomuser01 wrote:^ doesn't work. I'm out of ideas.Code: Select all
<onLoad> __WPL:setWaypointIndex( 1); </onLoad>
How do I make the script start at waypoint 1 no matter what waypoint it thinks is closer?
Code: Select all
<onLoad>
__WPL:setWaypointIndex(__WPL:findWaypointTag("One"));
</onLoad>
<!-- # 1 --><waypoint x="-9999" z="-9999" tag="One"> </waypoint>
Code: Select all
-- onLoad event
-- possibility for users to overwrite profile settings
if( type(settings.profile.events.onLoad) == "function" ) then
local status,err = pcall(settings.profile.events.onLoad);
if( status == false ) then
local msg = sprintf("onLoad error: %s", err);
error(msg);
end
end
Code: Select all
-- Update inventory
inventory:update();
Normally the last point and the first point are not the same. If I understand correctly, you need the last point to be the same because the next file starts at that location. I suggest in the future you avoid starting files in exactly the same place to avoid this problem. You could connect the files together and make 1 big file. You should then be able to control what path it takes using the __WPL commands.randomuser01 wrote:Could really use some help with this. Trying to chain together several scripts and they all start and end on the exact same spot. So half the time a new script will load, and it will automatically set the last waypoint as next (because start and end are the same) and that means it skips that waypoint file completely.
Well, let me tell you what it's doing, and maybe you can give me some input.rock5 wrote:Normally the last point and the first point are not the same. If I understand correctly, you need the last point to be the same because the next file starts at that location. I suggest in the future you avoid starting files in exactly the same place to avoid this problem. You could connect the files together and make 1 big file. You should then be able to control what path it takes using the __WPL commands.randomuser01 wrote:Could really use some help with this. Trying to chain together several scripts and they all start and end on the exact same spot. So half the time a new script will load, and it will automatically set the last waypoint as next (because start and end are the same) and that means it skips that waypoint file completely.
Code: Select all
__WPL:setWaypointIndex(1);
Yes.fred55555 wrote: so would you put this in the waypoint.xml forward at the start and backward at the end so it keeps going backand forth through the waypoints instead of looping back to waypoint 1.
Users browsing this forum: Bing [Bot] and 5 guests