brainstorm
Member
Okay I'm calling a loop and I'm wondering how I'm supposed rework so it doesn't bring up an error. I'm using it inside Scene Battle
Code:
loop do
@skillshotarrow.update
if @skillshotarrow.x < 640 - 77 and @direction == 0
@skillshotarrow.x += 5
if @skillshotarrow.x >= 640 - 77
@direction = 1
end
elsif @skillshotarrow.x > 73 and @direction == 1
@skillshotarrow.x -= 5
if @skillshotarrow.x <= 73
@direction = 0
end
end
if Input.trigger?(Input::C)
@skillshotvar += 1
@skillshotx = @skillshotarrow.x
if @skillshotx.between?(142,247)
@skillshotpower += 1
end
end
# Abort loop if screen is changed
if @skillshotvar >= 3
break
end
end