Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / please read

Author
Message
Snookie
19
Years of Service
User Offline
Joined: 11th Dec 2002
Location:
Posted: 14th Dec 2002 14:59
can someone please tell me why my 2D box is not showing

load bitmap "C:\Ste\yellow.bmp"
load sound "C:\Ste\end.wav",1
ink rgb(244,214,210),0
hide mouse
loop music 1
sync on
do
if upkey()=1 then circle 200,200,30
if upkey()=1 then play sound 1
if downkey()=1 then box left,top,right,bottom
sync
loop
suspend for key
end

the circle shows fine and sound plays fine.. but no box, i also seen that it said filled box, if any one will be willing to help me can they tell me the code for a none filled box please... i am very new.. say 3 days i have been playing with this cool program
Dazza
20
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 14th Dec 2002 17:55
Hi there. If this is the full source code for you program the problem is that you are using left, top, right and bottom which are all set to 0. So, in effect you are drawing a box starting at 0, 0 going to 0, 0.

Trying using
top = 10
left = 10
right = 100
bottom = 100

at the top of your code and everything should be okay then.

Hope that helps.

Moggie100
20
Years of Service
User Offline
Joined: 15th Oct 2002
Location: Behind You...
Posted: 18th Dec 2002 22:37
Here's a nifty function for drawing a clear box, aptly called 'clearbox'.



Here's an example of how to use it:



You define the size of the box using the normal 'box' command setup: ie. "top,left,bottom,right" in that order.

Hope this helps ya.
Mog.

If u need any other help e-mail me, or call me on MSN at moggie100@hotmail.com

Life is like a hot bath, the longer you're in it, the more wrinkles you get.
Kangaroo2
20
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 21st Dec 2002 01:30
hey thanx Moggie thats obvious but damn cool

* If the apocalypse comes, email me *
Moggie100
20
Years of Service
User Offline
Joined: 15th Oct 2002
Location: Behind You...
Posted: 5th Jan 2003 02:03
lol, I just got fed up of having to type out 4 lines of code every time I wanted a stat bar

Life is like a hot bath, the longer you're in it, the more wrinkles you get.

Login to post a reply

Server time is: 2022-12-06 17:21:17
Your offset time is: 2022-12-06 17:21:17