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.
For the main menu i have buttons which dissolve in on idle/hover when switched. The problem is that it too happens when the screen is first shown.
So what i want is that when the screen is shown the buttons are already displayed on alpha 1.0 rather than fading in. I know idle is the problem but dont know how to solve it. Does anyone have a solution for me?
transform main_menu_buttons_dissolve:
alpha 1.0
on idle:
alpha 0.3
linear 1.0 alpha 1.0
on hover:
alpha 0.3
linear 1.0 alpha 1.0
So essentially this says:
start at alpha 1.0
when idle, start at alpha 0.3 then take one second to transition to alpha 1.0
when hovered, start on alpha 0.3 then take one second to transition to alpha 1.0
appear
Is delivered if the condition is true when the screen is first shown, to instantly show the child.
show
Is delivered when the condition changes from false to true.
hide
Is delivered when the condition changes from true to false.
transform main_menu_buttons_dissolve:
alpha 1.0
on idle:
alpha 0.3
linear 1.0 alpha 1.0
on hover:
alpha 0.3
linear 1.0 alpha 1.0
So essentially this says:
start at alpha 1.0
when idle, start at alpha 0.3 then take one second to transition to alpha 1.0
when hovered, start on alpha 0.3 then take one second to transition to alpha 1.0
kivik wrote: ↑Fri Jun 01, 2018 5:58 am
Try using on appear: with alpha 1.0? I could be completely off base though.
appear
Is delivered if the condition is true when the screen is first shown, to instantly show the child.
show
Is delivered when the condition changes from false to true.
hide
Is delivered when the condition changes from true to false.
Imperf3kt wrote: ↑Fri Jun 01, 2018 6:07 am
Did you get any error when trying either, or did it simply do the same as it was in the first place?
This is what I was suggesting:
transform main_menu_buttons_dissolve:
alpha 1.0
on hover, replaced:
alpha 0.3
linear 1.0 alpha 1.0
It completly ignores on replaced and only dissolves when on hover. I copy pasted what you wrote and tested again in case i did something wrong but same result.
start
A pseudo-event, triggered on entering an on statement, if no event of higher priority has happened.
show
Triggered when the transform is shown using the show or scene statement, and no image with the given tag exists.
replace
Triggered when transform is shown using the show statement, replacing an image with the given tag.
hide
Triggered when the transform is hidden using the hide statement or its python equivalent.
Note that this isn't triggered when the transform is eliminated via the scene statement or exiting the context it exists in, such as when exiting the game menu.
replaced
Triggered when the transform is replaced by another. The image will not actually hide until the ATL block finishes.
update
Triggered when a screen is updated without being shown or replacing another screen. This happens in rare but possible cases, such as when the game is loaded and when styles or translations change.
hover, idle, selected_hover, selected_idle
Triggered when button containing this transform, or a button contained by this transform, enters the named state.
start
A pseudo-event, triggered on entering an on statement, if no event of higher priority has happened.
show
Triggered when the transform is shown using the show or scene statement, and no image with the given tag exists.
replace
Triggered when transform is shown using the show statement, replacing an image with the given tag.
hide
Triggered when the transform is hidden using the hide statement or its python equivalent.
Note that this isn't triggered when the transform is eliminated via the scene statement or exiting the context it exists in, such as when exiting the game menu.
replaced
Triggered when the transform is replaced by another. The image will not actually hide until the ATL block finishes.
update
Triggered when a screen is updated without being shown or replacing another screen. This happens in rare but possible cases, such as when the game is loaded and when styles or translations change.
hover, idle, selected_hover, selected_idle
Triggered when button containing this transform, or a button contained by this transform, enters the named state.
If idle isn't recognized as higher, a basic:
on start, show:
....alpha 1.0
might do you
It doesnt work ):
(unless i understood it wrong, i added: