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.
but it didn't work and while I was searching in the renpy's documentation I saw "event" and it distracted me. now I'm back to this and still can't figure what's wrong with it.
transform my_rotate(degrees=0):
subpixel True
linear 1.0 rotate degrees
screen main_menu():
default var = False
showif var:
add "ui/menu.png" at my_rotate(degrees=40)
else:
add "ui/menu.png" at my_rotate()
textbutton _("do it") action ToggleScreenVariable('var')
You can obviously just add the image without the at statement in the else fork... I just threw it in as an example, this is untested so there could be spelling/small tech errors. The approach itself is sound, you prolly do not need showif here either, I usually use it in this cases so I do not forget it exists (can be really useful at times).
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
Yeah... st is too old for that screen, my set of ATL instructions does not account for that. You'll have to reset troopers version so it doesn't keep adding up but it should work.
Orz, if you don't know it, default only works with 6.99.4+, which is currently in pre-release. In order to get it, go to the preferences on the launcher,
xela is right, if you don't want the button to continuously add 40 degrees to the image (which I thought I'd try because I wanted to see if I could do it), in the butt_rote function change "rotee += 40" to "rotee = 40."
xela--I want to thank you so much for teaching me that transform definitions could take variables, i.e. "transform route(degrees=0)"
I had no idea! The ATL page doesn't show transform with parens...so I didn't think it was possible. How do you know which definitions can take variables like that if it isn't documented?
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)
trooper6 wrote:
I had no idea! The ATL page doesn't show transform with parens...so I didn't think it was possible. How do you know which definitions can take variables like that if it isn't documented?
It is documented... there are just no examples. There is a lot of stuff in Ren'Py that doesn't offer any examples, mainly because the engine allows to do far too many things in too many different ways in order to document them properly, so people are using the Q&Ann section in the forum to share knowledge.
One of the coolest things I found out just a week ago is how to use ATL instructions inside of CDDs through At() class. I've been using both for years but never put two and two together before working on Rhythm minigame with Kaen. I guess that some stuff you just figure out by trail and error with time.
Huh! That is cool! Do you think you'd be able to put the rhythm example in the Cookbook so other could study your CCD At() revelation?
A Close Shave:
*Last Thing Done (Aug 17): Finished coding emotions and camera for 4/10 main labels.
*Currently Doing: Coding of emotions and camera for the labels--On 5/10
*First Next thing to do: Code in all CG and special animation stuff
*Next Next thing to do: Set up film animation
*Other Thing to Do: Do SFX and Score (maybe think about eye blinks?)