-
unicron
- Posts: 38
- Joined: Fri Mar 05, 2010 3:29 pm
#1
Post
by unicron » Sat Mar 27, 2010 10:59 am
I got the turning and targeting in there generically, but it doesn't recycle the waypoint until it is cleared. I have no knowledge of code fyi. I just throw together stuff that might seem like it makes sense lol. Just a fair warning. Any help is appreciated. It seems to work rather well other than repeating itself until it is finished.
Code: Select all
<!-- # 3 --><waypoint x="22630" z="21724">
camera:setRotation(math.rad(90));
player:findTarget();
if( player.Battling and ( player.Fighting == false ) ) then
__WPL:setWaypointIndex( __WPL.CurrentWaypoint - 1 );
return;
end;
yrest(10);
camera:setRotation(math.rad(180));
player:findTarget();
if( player.Battling and ( player.Fighting == false ) ) then
__WPL:setWaypointIndex( __WPL.CurrentWaypoint - 1 );
return;
end;
yrest(10);
camera:setRotation(math.rad(270));
player:findTarget();
if( player.Battling and ( player.Fighting == false ) ) then
__WPL:setWaypointIndex( __WPL.CurrentWaypoint - 1 );
return;
end;
yrest(10);
</waypoint>
I tried changing player.Fighting == true , but it doesn't seem to make a difference.
Also what do you use to not skip waypoints? I tried something like "<option name="WAYPOINT_PASS" VALUE="500" />, but that didn't end up going over well hehe.
-
Administrator
- Site Admin
- Posts: 5307
- Joined: Sat Jan 05, 2008 4:21 pm
#2
Post
by Administrator » Sat Mar 27, 2010 12:41 pm
First and foremost, you should be calling player:update() before you query any information from the player.
Also, you're calling this multiple times:
Code: Select all
__WPL:setWaypointIndex( __WPL.CurrentWaypoint - 1 );
Each time that's called, it'll rewind another waypoint. You could just use __WPL:setWaypointIndex(24), for example, to rewind to waypoint #24.
Who is online
Users browsing this forum: Ahrefs [Bot] and 1 guest