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.

DarkBASIC Professional Discussion / Sprite Collision - Find Unknown/Not Specified Sprite?

Author
Message
luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 23rd May 2010 16:36
Hello,
i just realised that dbpro is very poor with sprite collisions.
I hope someone can help me to find when 2 sprites are colliding which is the 2nd one?

sprite collision (1,0) shows that there is collision, using zero for the second sprite means that it`ll check for collision with any.But how to find which is it when collision ocure?

Some idea just flood my mind but is not very clear so i`ll wait some suggestions, until i clear it.

Where there is a will, there is a way.
I often edit my posts, that`s who i am
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 23rd May 2010 23:26
The value returned is the number of the sprite that has been collided with.

luskos
19
Years of Service
User Offline
Joined: 28th Jun 2007
Location:
Posted: 24th May 2010 05:43
So the sprite hit was the one that gives true or false?

I was misslead by this:

Quote: "This command will return a one if the specified sprite is overlapping the target sprite specified. "


It`s essencial to read carefully!I missed the "a"...

Where there is a will, there is a way.
I often edit my posts, that`s who i am

Login to post a reply

Server time is: 2026-07-25 08:30:14
Your offset time is: 2026-07-25 08:30:14