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.

Newcomers DBPro Corner / Why don't they change color?

Author
Message
Raybrite2
15
Years of Service
User Offline
Joined: 16th May 2009
Location: Cyberspace
Posted: 21st Jun 2009 06:03
I can understand why the white cube passes through the red one, but the book says one of them is supposed to change colors when they hit.
I get only a passing through with no blink or color change.
What did I miss this time? ( I think it has something to do with the If Object Hit part.)



I am using DB Pro Trial for now until my other one arrives.
lucifer 1101
15
Years of Service
User Offline
Joined: 26th Jan 2009
Location: Melbourne, Australia
Posted: 21st Jun 2009 07:19
the only thing that i have noticed wrong is the repeat until has nothing inside of it, its just another loop...

Come and have a look at my hobby site once your ready..
http://darkdstudio.webs.com/
Note: its still really bare..
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 21st Jun 2009 07:54 Edited at: 21st Jun 2009 07:57
that's a strange bit of code but it does work. the problem is you're coloring object 2 black, then white, and then syncing. if you really want to confirm it's turning black, add a sync between:

Color object 2,0
sleep 20

otherwise, you can change it's color 1,000,000 times each loop but you'll only see it once you call sync.


Raybrite2
15
Years of Service
User Offline
Joined: 16th May 2009
Location: Cyberspace
Posted: 21st Jun 2009 10:33
That made it blink. At least I know something is happening there.
This comes out of the tutorials by TDK that are in the forums.
I am just learning and I understand a lot of what is going on. Every day I absorb a bit more. (slow learner)
Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 21st Jun 2009 17:28
It looses the collision check and doesn't perform coloring
dunno why

Scorpyo
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: italy
Posted: 21st Jun 2009 17:48
I forgot you must use - object collision - command

Raybrite2
15
Years of Service
User Offline
Joined: 16th May 2009
Location: Cyberspace
Posted: 22nd Jun 2009 01:24
That's what I was trying to get it to do. Thanks. I must look into it and see what is different.
It also has a counter. Great!
I will analyze it with rem statements and make sure I understand what all it does. That way I will learn.
Thank you.

Login to post a reply

Server time is: 2024-11-25 04:40:49
Your offset time is: 2024-11-25 04:40:49