I'm making a side scrolling game where the player can randomly encounter an event along the way.
That means the encounter spawns somewhere along the path and comes into frame as you move from left to right.
Now what I want to do is make the encounter a button that you can click on.
The problem
I normally use imagebuttons, however they are part of a screen, and screens can't be animated.
Because the encounter (and the player) move around, I need to figure out a way the player can click on the encounter.
The Question
How do I make clickable buttons that move around?
Visual:
https://i.imgur.com/fpjT2r3.mp4
How to make a clickable moving button
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.
-
Exiscoming
- Regular
- Posts: 127
- Joined: Tue Apr 29, 2014 5:37 pm
- Contact:
- Imperf3kt
- Lemma-Class Veteran
- Posts: 3636
- Joined: Mon Dec 14, 2015 5:05 am
- Location: Your monitor
- Contact:
Re: How to make a clickable moving button
Imagebutton suit this well.
Take a look at this post which has an example project that details exactly how to do what you're asking.
viewtopic.php?f=51&t=22565&start=75#p455107
Take a look at this post which has an example project that details exactly how to do what you're asking.
viewtopic.php?f=51&t=22565&start=75#p455107
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Twitter
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
pro·gram·mer (noun) An organism capable of converting caffeine into code.
Current project: GGD Mentor
Free Android GUI - Updated occasionally
Imperf3kt Blackjack - a WIP blackjack game for Android made using Ren'Py
-
Exiscoming
- Regular
- Posts: 127
- Joined: Tue Apr 29, 2014 5:37 pm
- Contact:
Re: How to make a clickable moving button
That's an excellent tutorial. Thanks!
Who is online
Users browsing this forum: Bing [Bot], Google [Bot]