Yes that makes sense to me, that could be the reason!
Would be cool if you could have a look
Thank you!
Would be cool if you could have a look

Thank you!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

class Cycle
def initialize
@s = Proc.new { print 'Waypoint Reached!'}
@f = Proc.new { print 'Failed! ' }
@range = 0
@phase = 1
end
def update
case @phase
when 1
Pathfind.new(Node.new(2, 3), 1, @range, @s, @f)
@phase = 2
when 2
Pathfind.new(Node.new(3, 6), 1, @range, @s, @f)
@phase = 3
when 3
Pathfind.new(Node.new(4, 10), 1, @range, @s, @f)
@phase = 4
end
end
end
class Cycle
def initialize
@s = Proc.new { print 'Waypoint Reached!'}
@f = Proc.new { print 'Failed! ' }
@range = 0
@first_switch = "on"
end
def update
if @first_switch == "on"
p "phase for the first two waypoints"
Pathfind.new(Node.new(2, 3), 1, @range, @s, @f)
Pathfind.new(Node.new(3, 6), 1, @range, Proc.new { @second_switch = "on" }, @f)
@first_switch = "off"
#@second_switch = "on" # WHEN activating this line, the third waypoint works.
end
if @second_switch == "on"
p "phase for the third waypoint"
Pathfind.new(Node.new(4, 10), 1, @range, @s, @f)
@second_switch = "off"
end
end
end

Pathfind.new(Node.new(Mouse.tile_x, Mouse.tile_y), @char_id)
Pathfind.new(Node.new(Mouse.tile_x, Mouse.tile_y+6), @char_id)
#Pathfind.new(Node.new(x, y), *args)
Pathfind.new(Node.new(8, 6), 13)

s = Proc.new { print 'Goal Reached!'}
f = Proc.new { print 'Failed!' }
#pathfind(x, y, id, range, s, f)
Pathfind.new(Node.new(Mouse.tile_x, Mouse.tile_y), 13, 0, s, f) 
#Pathfind.new(Node.new(x, y), *args)
Pathfind.new(Node.new(8, 6), 13)OOS
OOO
EOOOOS
OOP
EPPOOS
OPO
EOO
pathfind(x, y, id, range, s, f)