Here you go.
A little update, where some of the waiting is cut out, and you are now able to save your box
You can only have one saved box at a time, but I'll look a bit more into this in a while.
Now, I'm going to work a bit on the editing of the box, maybe make you able to move it around, and save its position. And I might make you able to make more boxes and other primitives at once, and save all of it, and then maybe make this into my first, simple level editor!
I don't know if it'll work, but I'm gonna give it a shot.
Here's the code:
`By Frederik Lundgaard Hansen A.K.A. KLU 007
`################################################################################
`# 03-07-2005 // 21:00:03 #
`# #
`# Now I will try to make a simple box maker/editor. #
`# Let's see how things will work out: #
`################################################################################
`make the directory where you'r file should be saved
make directory "c:/Box Maker"
set dir "c:/Box Maker"
`The introduction
print "Welcome to KLU 007's Box Maker BETA!"
sleep 1000
print " Here you will be able to make a box, just like you want it!"
sleep 2000
print " Almost..."
sleep 1000
cls
print "It's really easy!"
sleep 1000
print "Just follow the guide, and you'll end up with your very own, personal box!"
sleep 3000
cls
`Confirm If you're ready to begin
input "Do you think you're ready to begin? (Y/N) ", yorno$
`If "n", then exit
if lower$(yorno$)="n"
print "What a shame..."
sleep 1000
print "See you later then!"
sleep 1000
end
endif
`If "y", then continue
if lower$(yorno$)="y"
cls
print "Well then, let's get started!"
sleep 1000
endif
`The beginning of the editor
load:
cls
if file exist ("C:/Box Maker/BOX.KLU")
input "Do you want to load your saved box? (Y/N) ", load$
if lower$(load$)="n"
cls
print "Okay. The guide will now continue to the Box Making part."
sleep 1000
gosub size
endif
if lower$(load$)="y"
print "Please wait a moment while your box is being loaded..."
sleep 1000
open to read 1,"C:/Box Maker/BOX.KLU"
read float 1,size#
read float 1,redcolor#
read float 1,bluecolor#
read float 1,greencolor#
close file 1
cls
print "Your box was succesfully loaded!"
sleep 1000
gosub view_box
endif
endif
size:
cls
Input "How big should the box be? (1 or 2 digits, must be a positive value) : ", size#
if size#<0
Print "Please write a positive value!"
sleep 1000
gosub size
endif
if size#>99
Print "Please, only 2 digits!"
sleep 1000
gosub size
endif
cls
Print "Now, let's color the box"
sleep 1000
redcolor:
cls
Input "How much Red do you want in your Box Color? (0-255) ", redcolor#
if redcolor#<0
print "Remember to follow the rules! 0-255!"
sleep 1000
gosub redcolor
endif
if redcolor#>255
Print "You must enter a number between 0 and 255"
sleep 1000
gosub redcolor
endif
bluecolor:
cls
Input "Wonderfull... Now, how much blue do you want? (0-255) ",bluecolor#
if bluecolor#<0
print "Come on, READ! Between 0 and 255!"
sleep 1000
gosub bluecolor
endif
if bluecolor#>255
print "Please select a value BETWEEN 0 and 255"
sleep 1000
gosub bluecolor
endif
greencolor:
cls
input "That's lovely... Now, let's move on to the green color: (0-255) ", greencolor#
if greencolor#<0
print "Remember to follow the rules!"
sleep 1000
gosub greencolor
endif
if greencolor#>255
print "The rules... 0-255... Try again"
sleep 1000
gosub greencolor
endif
greencolor#=255
input "Do you want to save your box? (Y/N) ",lort$
input "This will overwrite any previously saved box. Continue? (Y/N) ",save$
if lower$(save$)="y"
gosub savebox
endif
if lower$(save$)="n"
gosub view_box
endif
savebox:
cls
print "Please wait while Box Maker saves your work..."
sleep 1000
delete file "C:/Box Maker/BOX.KLU"
open to write 1, "c:/Box Maker/BOX.KLU"
write float 1, size#
write float 1,redcolor#
write float 1,bluecolor#
write float 1,greencolor#
close file 1
Print "Saved succesfully!"
sleep 1000
view_box:
cls
print "cool, now let's see your box..."
sleep 1000
cls
print "Loading..."
sleep 800
cls
make object cube 1,size#
color object 1, rgb(redcolor#,bluecolor#,greencolor#)
objsx=object size x(1)*6
objsy=object size y(1)/2
objsz=object size z(1)*6
make matrix 1, objsx,objsz,objsx/10,objsz/10
position matrix 1, -(objsx/2),-objsy,-(objsz/2)
position camera object position x(1),object position y(1)+(object size y(1)),object position z(1)-(object size z(1)*2)
point camera object position x(1),object position y(1),object position z(1)
editboxnr=1
do
if keystate(200)
move object editboxnr,1
endif
if keystate(208)
move object editboxnr,-1
endif
if keystate(203)
turn object left editboxnr,2
endif
if keystate(205)
turn object right editboxnr,2
endif
set cursor 0,0
print "Wow, this is awesome..."
print "Press ESC to exit"
sync
loop
Hope you like it.
Tell me if there's any errors or bugs, it's not that well tested yet...
KLU 007
[EDIT] Updated the code to make it faster. I've removed a lot of the waiting time. And now you can control your box araound with the arrowkeys.