Jump to content


Photo

Clickable Sprites


  • Please log in to reply
7 replies to this topic

#1 JakSplitter

JakSplitter

    GMC Member

  • New Member
  • 14 posts

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. :)
  • 0

#2 Dangerous_Dave

Dangerous_Dave

    GMC Member

  • Global Moderators
  • 9276 posts
  • Version:Unknown

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.
  • 0

#3 rowboat-synclaire

rowboat-synclaire

    Gungine Creator

  • New Member
  • 481 posts

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.
  • 0

#4 Dangerous_Dave

Dangerous_Dave

    GMC Member

  • Global Moderators
  • 9276 posts
  • Version:Unknown

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?
  • 0

#5 JimBond25

JimBond25

    GMC Member

  • New Member
  • 21 posts

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.
  • 0

#6 gm402

gm402

    GMC Member

  • New Member
  • 265 posts

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...
  • 0

#7 yoshermon

yoshermon

    GMC Member

  • New Member
  • 640 posts
  • Version:None

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.
  • 0

#8 Dangerous_Dave

Dangerous_Dave

    GMC Member

  • Global Moderators
  • 9276 posts
  • Version:Unknown

Posted 21 May 2008 - 04:08 AM

Use global mouse press, and check the position of the mouse.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users