Hi all,
I'm just wondering if there's a way to move or distort the menu buttons so they're more difficult to select. Timers too, would make the gameplay quite interesting.
Basically, I'm inspired by Yakuza 0's telephone mini-game, and wondering if Ren'Py can create a similar effect?
https://youtu.be/aliSO4k2X0E
Moving menu buttons?
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.
Re: Moving menu buttons?
The short answer is yes. This is definitely possible. It uses screen language and ATL. Learn more about those things in these links:
https://renpy.org/doc/html/screens.html
https://renpy.org/doc/html/screen_actions.html
https://renpy.org/doc/html/atl.html
I messed with some code that doesn't provide much functional purpose other than visually showing that you can move buttons around and limit a screen by a timer:
https://renpy.org/doc/html/screens.html
https://renpy.org/doc/html/screen_actions.html
https://renpy.org/doc/html/atl.html
I messed with some code that doesn't provide much functional purpose other than visually showing that you can move buttons around and limit a screen by a timer:
Code: Select all
transform anim:
choice:
linear 0.5 zoom 2.0
pause 0.45
linear 0.5 zoom 1.0
choice:
linear 0.5 zoom 0.5
pause 0.55
linear 0.5 zoom 1.0
choice:
linear 0.5 xpos 50
pause 0.6
linear 0.5 xpos 0
choice:
linear 0.5 ypos 50
pause 0.4
linear 0.5 ypos 0
choice:
pause 1.3
repeat
screen test():
vbox:
align (0.5, 0.5)
spacing 50
for i in ['Jump', 'Dodge', 'Fall', 'Hide']:
textbutton i at anim:
action Return()
text str(duration/10.0) align (0.5, 0.1)
timer 0.1 action If(duration<=0, Return(), SetVariable("duration", duration-1)) repeat True
image gray = "#CCC"
label start:
$ duration = 100
scene gray
call screen test
return
- Kinmoku
- Miko-Class Veteran
- Posts: 591
- Joined: Mon Aug 11, 2014 9:39 am
- Completed: One Night Stand
- Projects: VIDEOVERSE
- Tumblr: gamesbykinmoku
- itch: kinmoku
- Location: Germany
- Contact:
Re: Moving menu buttons?
Whoa, that's awesome! Then my next question is; can transform be more randomised? So it'd be more difficult to click on the buttons? And, can the buttons act freely and animate over the top of one another, instead of pushing the others aside?
Re: Moving menu buttons?
You can make it as random as you want really. It depends on the type of behavior you want the buttons to exhibit and then could make a transform that does it. I kept my example simplified by using only one transform that applied to all of the buttons. You could also have a different transform for each button.Kinmoku wrote:Then my next question is; can transform be more randomised? So it'd be more difficult to click on the buttons?
In my first example, they move each other around because they're in the same vbox. They can be placed on a different screen element like a fixed and then they can overlap. I modified the code from my other post so that they will overlap. Heh, it is a jumbled mess visually, but it shows that buttons can overlap at the very least.Kinmoku wrote:And, can the buttons act freely and animate over the top of one another, instead of pushing the others aside?
Code: Select all
transform anim:
choice:
linear 0.5 zoom 2.0
pause 0.45
linear 0.5 zoom 1.0
choice:
linear 0.5 zoom 0.5
pause 0.55
linear 0.5 zoom 1.0
choice:
linear 0.5 xpos 50
pause 0.6
linear 0.5 xpos 0
choice:
linear 0.5 ypos 50
pause 0.4
linear 0.5 ypos 0
choice:
pause 1.3
repeat
screen test():
fixed:
align (0.5, 0.5)
maximum (200, 200)
for i in ['Jump', 'Dodge', 'Fall', 'Hide']:
textbutton i at anim:
action Return()
text str(duration/10.0) align (0.5, 0.1)
timer 0.1 action If(duration<=0, Return(), SetVariable("duration", duration-1)) repeat True
image gray = "#CCC"
label start:
$ duration = 100
scene gray
call screen test
return
Re: Moving menu buttons?
Lol! What the heck? Now I wanna play that game.
A little warning would have been nice, though. I didn't exactly expect bikini girls.
A little warning would have been nice, though. I didn't exactly expect bikini girls.
Phoenix Star - Persistence, perseverance, ambition.
...
Lost Legends
[VN][Fantasy][Open World] Lost Legends
(Bug Thread) Lost Legends
(Direct Download)
Deviant Art: ...
Lost Legends
[VN][Fantasy][Open World] Lost Legends
(Bug Thread) Lost Legends
(Direct Download)
Discord: saltome
Itch: Phoenix Start
Who is online
Users browsing this forum: Bing [Bot]