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.

Code Snippets / [DBC] Simple "Colour your own cube" code.

Author
Message
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 20th May 2007 14:23
Well, this is my first attempt at coding without a tutorial, and I thought I might as well post it.
You use Q and A to change the red up and down
W and S to change the green up and down
E and D to change the blue up and down

Hope you enjoy



E.D.

Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 20th May 2007 18:56
It doesn't work.

Aren't I full of questions?
What happens when when you mix coke, pop rocks, vinegar, and baking soda?
Xlaydos
20
Years of Service
User Offline
Joined: 26th Mar 2004
Location:
Posted: 20th May 2007 21:15
It works for me..., thats nice for a first program . If you want something extra to add, try adding sliders so you can see which shade of blue you have instead of a number out of 255
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 21st May 2007 11:17 Edited at: 21st May 2007 11:27
That's an idea ....
But i have a question...... how do I make it so the box's length is = to the current variable color??

Because if I used something like


it would be creating about 10 boxes every second......
But if you could help me with that then I could have sliders .




I'm currently working on a car script.

If you want the original search for "realistic car" and the second post and onwards have the code I used as a base .

But this is my current code:




land.x I'm just using as it is a better gauge of speed than a matrix
and car.x is a simple rectangle with rounded edges .

This is the code I based that off:





E.D.

n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 22nd May 2007 00:34
looks promising.

Ling creckt tsi nocreckto havela? NASA chetallnar mo lu'ul nasding!
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 22nd May 2007 10:14
Quote: "looks promising."

Thanks, I'm having trouble with collision though .

E.D.

n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 22nd May 2007 20:39
After you set Red and blue to 0, they stop working!! :o

Ling creckt tsi nocreckto havela? NASA chetallnar mo lu'ul nasding!
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 23rd May 2007 09:48
Oh...... well that sucks .

I'll work on it some more later .

E.D.

Login to post a reply

Server time is: 2024-11-22 19:11:45
Your offset time is: 2024-11-22 19:11:45