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.

AppGameKit Studio Chat / Ideas for shaking a sprite

Author
Message
Syndu
17
Years of Service
User Offline
Joined: 1st Nov 2006
Location:
Posted: 27th Feb 2022 15:25
I have a sprite being used as a Button. The purpose of this button is to give a Hint to a puzzle solution. If a player waits idle without making a move I wanted to have the Hint Button maybe increase in size and shake a little to get the attention of the player. Anyone have a recommendation of how they might perform this? Having some issues with this interrupting the game flow. Thanks in advance, you folks are always great when I get stuck.
Syndu
17
Years of Service
User Offline
Joined: 1st Nov 2006
Location:
Posted: 27th Feb 2022 15:27
To be clear Tier 1
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 27th Feb 2022 17:37
Simple example. Button will shake for 1.5 seconds if mouse has not moved after 3 seconds. If mouse moves during the shaking, it stops and resets.

Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds

Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 28th Feb 2022 00:52
@phaelax, i miss MouseMoveX/Y() which we have in DBPro, too

@syndu, i've fixed the typo in the thread title ("shacking" to "shaking") so search will include this discussion while offering this cheap zoom effect:



i'm doing something similar in this ear-buster.
Syndu
17
Years of Service
User Offline
Joined: 1st Nov 2006
Location:
Posted: 28th Feb 2022 18:11
As always you folks have come thru. Thank you
Game_Code_here
3
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 1st Mar 2022 04:08
Use a animated sprite with frames, frame 1 is idle, and playing the sprite is the shaking. that is the best way in my opinion.

Login to post a reply

Server time is: 2024-04-23 16:11:04
Your offset time is: 2024-04-23 16:11:04