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 Discussion / does nayone know how to do a sprite click

Author
Message
sorcre
23
Years of Service
User Offline
Joined: 13th Dec 2002
Location: United States
Posted: 19th Apr 2003 16:59
like if mouseclick()=1 but i don't wana have to write the if Y>304 then if Y236 then if X
never achive your goals... cause if you do then what is next????
sorcre
23
Years of Service
User Offline
Joined: 13th Dec 2002
Location: United States
Posted: 19th Apr 2003 17:01
sorry i don't know what happened


i wana turn the sourcre below into like when u click on a sprite it does something. how do u do liek on spriteclick or however it is done

never achive your goals... cause if you do then what is next????
Chaos
23
Years of Service
User Offline
Joined: 8th Feb 2003
Location: United Kingdom
Posted: 19th Apr 2003 17:22
ok i think i know what u mean it would b something like the sourcecode below.

Darkworlds are all around us
most of us are still half asleep
Current project : Creature tournament
sorcre
23
Years of Service
User Offline
Joined: 13th Dec 2002
Location: United States
Posted: 19th Apr 2003 17:44
nope don't work that makes it so u have to click exactly on the cordinates i want it so u can click anywhere in the image

never achive your goals... cause if you do then what is next????
andrew11
23
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 19th Apr 2003 17:51
You could write:

if Y>304 and Y<349 and X>236 and X<401 then gosub game

It's not that much shorter, but I don't think you can make it shorter.

All programmers are playwrights and all computers are lousy actors." -Anon.
sorcre
23
Years of Service
User Offline
Joined: 13th Dec 2002
Location: United States
Posted: 19th Apr 2003 17:53
ya i will just do it that way

never achive your goals... cause if you do then what is next????
Redostrike
23
Years of Service
User Offline
Joined: 9th Feb 2003
Location: Belgium
Posted: 19th Apr 2003 18:10 Edited at: 19th Apr 2003 18:10
I use this. If my pic is 200*200.



Then the picture will flash whit the second picture you can adjust mousex() and mousey() at your needs.

Hope this helps.

Only heroes live forever
Vice
23
Years of Service
User Offline
Joined: 15th Apr 2003
Location:
Posted: 19th Apr 2003 19:47
U could make the tip of the mouse a sprite, and use sprite collision

Login to post a reply

Server time is: 2026-06-11 17:33:57
Your offset time is: 2026-06-11 17:33:57