Hey!
I am trying to make a function that Makes an Box with "#" as "Walls" of the box.
but everytime i tryed something, my mind was so close to explode... it is hard to program, but when i run that program i made, then it on ly displays this:
########
#
#
#
#
#
#
where i want it to do this:
¤ = air / space
#######
#¤¤¤¤¤#
#¤¤¤¤¤#
#¤¤¤¤¤#
#¤¤¤¤¤#
#¤¤¤¤¤#
#######
but can anyone post a link to a tutorial, to made that cind of boxes? or maybe just make a code(i know that its not supposed to make codes for me)to me.. please help
Thanks-
- mikk809h
[help][BoxPrint[xStart,xEnd,yStart,yEnd]Help] Question
Started by Goof, Oct 25 2012 02:23 PM
game computer help
3 replies to this topic
#1
Posted 25 October 2012 - 02:23 PM
#2
Posted 25 October 2012 - 02:29 PM
A couple hints:
y2 - y1 = height
After the first row you need (height - 2) rows with space in the center, then the final row.
The left wall is located at x = x1
The right wall is located at x = x2
y2 - y1 = height
After the first row you need (height - 2) rows with space in the center, then the final row.
The left wall is located at x = x1
The right wall is located at x = x2
for i=y1,y2 do term.setCursorPos(x,i) end
#3
Posted 25 October 2012 - 02:34 PM
Here's some code:
function drawBox(startX, startY, endX, endY)
for x = startX,endX do
for y = startY,endY do
if x == startX or x == endX or y == startY or y == endY then -- On an edge
term.setCursorPos(x, y)
term.write("#")
end
end
end
end
#4
Posted 25 October 2012 - 02:38 PM
Ty for quick response... i will use some of thoose codes.. if they works then i will be REALY happy ( if they would work with my WelcomeOS() operator system )
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











