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.

Dark GDK / how to exclude 1 sprite from mass sprite collision?

Author
Message
Wikaman1
16
Years of Service
User Offline
Joined: 17th Aug 2008
Location: Scotland
Posted: 18th Jul 2010 02:01 Edited at: 18th Jul 2010 02:02
so in my game I need the player sprite to collide with everything apart from the sprite located at the mouse. I use this to collide with everything:



what is the best way to exclude the mouse sprite from this?

thanks in advance.
JTK
14
Years of Service
User Offline
Joined: 10th Feb 2010
Location:
Posted: 18th Jul 2010 03:32
Quote: "dbSpriteCollision
This command will return a one if the specified sprite is overlapping the target sprite specified. If a target sprite has not been specified and a value of zero has been used, this command will return the sprite number of any sprite overlapping it. "


Basically, this means that when you pass a 0 as the second parameter, the return result is the sprite id that is overlapping with the player. Therefore, perform a test like so:



Hope this helps,

JTK

Login to post a reply

Server time is: 2024-11-19 20:30:49
Your offset time is: 2024-11-19 20:30:49