Overlay that moves on mouse movement

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
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.
Post Reply
Message
Author
Ace94
Regular
Posts: 113
Joined: Sat Apr 08, 2017 4:22 pm
Contact:

Overlay that moves on mouse movement

#1 Post by Ace94 »

Hi guys. I was curious if something like this is possible in Ren'Py? I've seen some games that use this kind of effect and I was curious if I can achieve the same with Ren'Py. For example the main character is having a shower and I want to add transparent bubbles all across the screen and whenever I move the mouse to the left or right or up or down the bubbles will move in that direction too. Is something like this possible? It will require a bigger sized picture than what the standard one the user is currently using so that there is more space for the bubbles to move towards to.

User avatar
Lord Hisu
Regular
Posts: 58
Joined: Sun Feb 11, 2018 2:31 am
Contact:

Re: Overlay that moves on mouse movement

#2 Post by Lord Hisu »

Yes, it is possible. You should use Sprites.
The example there is the opposite of what you want, but it will help you to move on the right direction. You'll need to code, though. I hope that's not a problem.

Ace94
Regular
Posts: 113
Joined: Sat Apr 08, 2017 4:22 pm
Contact:

Re: Overlay that moves on mouse movement

#3 Post by Ace94 »

Thanks. I am not the best at coding, but I will do my best and come back and ask for more hints when I get stuck.

User avatar
Milkymalk
Miko-Class Veteran
Posts: 753
Joined: Wed Nov 23, 2011 5:30 pm
Completed: Don't Look (AGS game)
Projects: KANPEKI! ★Perfect Play★
Organization: Crappy White Wings
Location: Germany
Contact:

Re: Overlay that moves on mouse movement

#4 Post by Milkymalk »

The repulsor example on the page Lord Hisu linked is very close to what you want to do. Of course, you have to change how the sprites move...
Crappy White Wings (currently quite inactive)
Working on: KANPEKI!
(On Hold: New Eden, Imperial Sea, Pure Light)

Post Reply

Who is online

Users browsing this forum: Dark79, Google [Bot]