Page 1 of 1
Show results after selection?
Posted: Wed Oct 19, 2022 8:50 am
by Swein
Hello, is there a ready-made design to show the results after the selection? For example, I want to get a result like you" fell and got injured" when the character selects the option to "go to the tavern", but I don't have a sample design that I can edit.
SAMPLE GAME:
https://bit.ly/3glQWGD
Re: Show results after selection?
Posted: Wed Oct 19, 2022 1:12 pm
by _ticlock_
Swein wrote: ↑Wed Oct 19, 2022 8:50 am
Hello, is there a ready-made design to show the results after the selection? For example, I want to get a result like you" fell and got injured" when the character selects the option to "go to the tavern", but I don't have a sample design that I can edit.
SAMPLE GAME:
https://bit.ly/3glQWGD
It is not clear what you are looking for. Based on the "sample game", I believe you are trying to make a simple screen (window) with some visuals (and visual effects) that accept a text message that is displayed as a result. Is it what you are looking for?
Re: Show results after selection?
Posted: Wed Oct 19, 2022 6:28 pm
by Swein
_ticlock_ wrote: ↑Wed Oct 19, 2022 1:12 pm
Swein wrote: ↑Wed Oct 19, 2022 8:50 am
Hello, is there a ready-made design to show the results after the selection? For example, I want to get a result like you" fell and got injured" when the character selects the option to "go to the tavern", but I don't have a sample design that I can edit.
SAMPLE GAME:
https://bit.ly/3glQWGD
It is not clear what you are looking for. Based on the "sample game", I believe you are trying to make a simple screen (window) with some visuals (and visual effects) that accept a text message that is displayed as a result. Is it what you are looking for?
Yes, I'm looking for a code or design that shows what happens after menu selection, I hope something like this has been done before.
Re: Show results after selection?
Posted: Thu Oct 20, 2022 11:47 am
by _ticlock_
Swein wrote: ↑Wed Oct 19, 2022 6:28 pm
Yes, I'm looking for a code or design that shows what happens after menu selection, I hope something like this has been done before.
1) What do you expect to happen after menu selection? A fixed result, a random result from a list with weights, or other logic?
Here is a simple example with a screen that shows a message with an on-show and on-hide curtains effect.
Code: Select all
screen show_message(message):
frame:
background "#055"
xsize 800 ysize 200
xalign 0.5 yalign 0.5
at curtains_show_hide
label _(message):
xalign 0.5 yalign 0.5
textbutton "":
xfill True yfill True
action Return()
transform curtains_show_hide(t=0.5):
on show:
crop(0.5,0.0,0.0,1.0)
easein t crop(0.0,0.0,1.0,1.0)
on hide:
crop(0.0,0.0,1.0,1.0)
easein t crop(0.5,0.0,0.0,1.0)
Note: Use your image for the frame background instead of a solid color for a better appearance:
Code: Select all
screen show_message(message):
frame:
background "some_image.png"
If you use menu selection. Here is a simple example with random result from a list:
Code: Select all
label start:
menu:
"The car doen't start"
"Find solution":
$ solution = renpy.random.choice([
_("You decided to call roadside assistance"),
_("You decided to call your boss and tell him you are sick"),
_("You decided to take a bus")
])
call screen show_message(solution)