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 / Hidden Objects Game

Author
Message
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 14th Jul 2010 21:54
Please help!

Does any one know how to make click on sprite (Just on visible alpha channel > 200)? This needs for making Hidden Object Game.
May be is there another way?
action 9000
16
Years of Service
User Offline
Joined: 27th May 2008
Location: Alberta, Canada
Posted: 15th Jul 2010 01:45 Edited at: 15th Jul 2010 01:46
You can do this quite easily with the spriteCollision function. All you need to do is put a 1x1 pixel image at your mouse position
dbMouseX() dbMouseY()

then check to see if the mouse's sprite is touching the sprite you want to press

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 15th Jul 2010 02:29
No, that won't work. Sprite collision checks the whole rectangular image, it does not take into account transparency.

[b]
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 15th Jul 2010 14:05
Thanks I know! That's not working! Please is there any way to do this?
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 27th Jul 2010 17:27
Hey folks! Any idea???
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 27th Jul 2010 20:58
There have been attempts to implement pixel-perfect collision and there was a vector collision as well. I've just made a search for the thread titles, haven't personally tested either of them. Try if one of these posted solutions work for you:

http://forum.thegamecreators.com/?m=forum_view&t=168273&b=22

http://forum.thegamecreators.com/?m=forum_view&t=138964&b=22

http://forum.thegamecreators.com/?m=forum_view&t=168243&b=22
Alex_Peres
AGK Master
15
Years of Service
User Offline
Joined: 13th May 2009
Location: The Milky Way Galaxy
Posted: 27th Jul 2010 22:29
Thanks Mireben! I just did know how it calls.

Login to post a reply

Server time is: 2024-11-19 20:36:55
Your offset time is: 2024-11-19 20:36:55