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.

Author
Message
THijs681
20
Years of Service
User Offline
Joined: 24th Feb 2004
Location: somewhere on the earth
Posted: 24th Feb 2004 12:39
I have problems with the collisions with the cube and the player.
The meanig is that the cube destroy itself when it comes in collision with the player, wath's wrong with my script?

Sorry about my English, please respect that i'm only 12 years old and that i'm dutch. (And not English).
THijs681
20
Years of Service
User Offline
Joined: 24th Feb 2004
Location: somewhere on the earth
Posted: 24th Feb 2004 12:40
PS: I'm using Dark Basic classic.
THijs681
20
Years of Service
User Offline
Joined: 24th Feb 2004
Location: somewhere on the earth
Posted: 24th Feb 2004 13:42
Come on, woul'd nobody help me?
please click at the 'Source' button under my post.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 24th Feb 2004 18:08
Hi THijs681
Ok, I've looked at your code and you need to put the
Quote: "
if object collision(1,3)=1 THEN delete object 3
"

inside the do loop this will then detect your cube, you then need to make an IF statement to say cube 3 not there do not do this part of code.
eg

If object number 3 <>1 then do above code else do nothing.

may want to use if... endif statements

Don,t give up, looks good

I have not even started on this part of coding but your little bit of code has show how to do quite a bit

In Space No One can Hear You Scream! (When your comm Line is cut?)
THijs681
20
Years of Service
User Offline
Joined: 24th Feb 2004
Location: somewhere on the earth
Posted: 25th Feb 2004 19:40
Hey Thanks!!! it works!
THijs681
20
Years of Service
User Offline
Joined: 24th Feb 2004
Location: somewhere on the earth
Posted: 25th Feb 2004 19:50
Oops, wrong, it doesn't work, it doe's nothing, i only thaught, because it was gone into the sphere.
THijs681
20
Years of Service
User Offline
Joined: 24th Feb 2004
Location: somewhere on the earth
Posted: 25th Feb 2004 21:18
fixed code, but now i have another problem.
please delete the textures in my code, or make your own.
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 26th Feb 2004 23:06
Here's your answer just paste it were you have your collision part.
rem line 53 like this then paste in code.

rem If Object collision(1,0)>0 delete object 0 : play sound 1

how did I get the answer. I looked at the help file (press F1) on Object collision, it tells me that it returns a the number of the object it hits if you use "Object collision(1,0)" so I put the same bit of code at the end of delete object.

In Space No One can Hear You Scream! (When your comm Line is cut?)
THijs681
20
Years of Service
User Offline
Joined: 24th Feb 2004
Location: somewhere on the earth
Posted: 28th Feb 2004 16:11
thnx

Login to post a reply

Server time is: 2024-11-26 07:28:57
Your offset time is: 2024-11-26 07:28:57