My version of an taller line is a bit "bigger":
class Bitmap
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# * Draw Line
# x0, y0 : the coordinates of the start of the line.
# x1, y1 : the coordinates of the end of the line.
#``````````````````````````````````````````````````````````````````````````
# This uses Bresenham's algorithm to draw a line
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
def draw_line (x0, y0, x1, y1, colour = font.color,width = 1,height = 1,skip = 0)
# Set boolean for steep lines
steep = (y1 - y0).abs > (x1 - x0).abs
if steep
# Reflect across y=x
tmp = x0
x0, y0 = y0, tmp
tmp = x1
x1, y1 = y1, tmp
end
# If in negative direction
if x0 > x1
# Swap initial points
tmp = x0
x0, x1 = x1, tmp
tmp = y0
y0, y1 = y1, tmp
end
ystep = y0 < y1 ? 1 : -1
deltax = x1 - x0
deltay = (y1 - y0).abs
error = deltax / 2
y = y0
# Advance by Rows
lop = skip * height
for x in x0.to_i...x1.to_i
if lop == skip * height
for w in 0...width
for h in 0...height
steep ? set_pixel (y+h, x+w, colour) : set_pixel (x+w, y+h, colour)
end
end
lop = 0
else
lop += 1
end
error -= deltay
if error < 0
y += ystep
error += deltax
end
end
end
end
But I will test your version for sure!
Your demo has a little error in it though. You use Variable 1 for collecting extra skill points from the girl, but you don't reset it, and for some reason you pass Variable 1 to Scene_SkillTree when talking to the guy, so if you select a number of skill points over the number of actors in the database and then go talk to the guy, you will get an error. That's just an error with the event setup in the demo though, not the script itself.
Jeah I already mentioned this error but I was to lazy to make a new version of the demo.
Thanks for report!!
Damn this 4 direction Curssor Move System is harder as I thought. I've already tested 3 Ideas without succes but my newest idea have potential.(I think.)
I hope I will be able to finisch it.
I also want to write an <hide> comment which let the skills become hidden as long there conditions are not sufussed.
If I'm allowed to say this. To lvlup in this Forum seems a bit to easy.
12 Posts and lvl 19. xD
As long
Deity
_______
I've made an Update.
Happy testing!