How would i make an image shake when hovered in a screen?
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
-
- Newbie
- Posts: 2
- Joined: Wed Dec 05, 2018 9:19 pm
- Contact:
How would i make an image shake when hovered in a screen?
I have an image displayed on my main menu screen. How would i go about making the image shake when the mouse hovers over it? (two times) I am trying to make the shake similar to the HIVESWAP FRIENDSIM menu logo shake, because it was made in Ren'py as well. Can anyone please help? Thank you in advance.
Re: How would i make an image shake when hovered in a screen?
Use 'on hover' statement with ATL.
I haven't seen exactly how it is in the game you mention, but this is an example:
Then in your screen:
I haven't seen exactly how it is in the game you mention, but this is an example:
Code: Select all
transform shake_twice:
on hover:
linear .02 xoffset 10
linear .02 xoffset 0
linear .02 xoffset -10
linear .02 xoffset 0
repeat 2
Code: Select all
add 'shaking_image' at shake_twice
-
- Newbie
- Posts: 2
- Joined: Wed Dec 05, 2018 9:19 pm
- Contact:
Re: How would i make an image shake when hovered in a screen?
thank you so much!!!! i have been testing stuff for so long thank youuuDannX wrote: ↑Thu Dec 06, 2018 1:34 pm Use 'on hover' statement with ATL.
I haven't seen exactly how it is in the game you mention, but this is an example:Then in your screen:Code: Select all
transform shake_twice: on hover: linear .02 xoffset 10 linear .02 xoffset 0 linear .02 xoffset -10 linear .02 xoffset 0 repeat 2
Code: Select all
add 'shaking_image' at shake_twice
Who is online
Users browsing this forum: Zahdernia