Sorry if i explained it bad, thanks.
Clickable Sprites
Started by JakSplitter, May 20 2008 10:41 PM
7 replies to this topic
#1
Posted 20 May 2008 - 10:41 PM
well, you know how in most mmorpgs you have a stat menu with a little button to add points into each right? im drawing the sprites next to each stat on the menu but how do i make the sprite clickable...?
Sorry if i explained it bad, thanks.
Sorry if i explained it bad, thanks.
#2
Posted 20 May 2008 - 10:59 PM
Please don't tel me you're making an mmorpg withut knowing how to do this...?
Just place your code in the mouse left pressed event of the object.
Just place your code in the mouse left pressed event of the object.
#3
Posted 20 May 2008 - 11:04 PM
i don't think he wants there to be objects...
i think he wants to know how to make it so that you can click on the sprite, and have it do something.
i think he wants to know how to make it so that you can click on the sprite, and have it do something.
#4
Posted 20 May 2008 - 11:25 PM
Wha? You assign the sprite to an object. Then use the mouse event. What are you talking about?
#5
Posted 20 May 2008 - 11:27 PM
I'm assuming this sprite belongs to an object. Use the event 'left mouse button'. This means whenever the mouse clicks the sprite of the object, it will perform the actions you instructed under this event.
#6
Posted 20 May 2008 - 11:31 PM
Make sure the object's x and y are equal to the point where the button is being drawn...
#7
Posted 21 May 2008 - 12:10 AM
Guys, what I'm getting out of this is that JakSplitter has an object that draws multiple sprites for the buttons, and he's wondering how to make the indivitual sprites clickable without having an object behind them.
#8
Posted 21 May 2008 - 04:08 AM
Use global mouse press, and check the position of the mouse.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











