use python function for screenshot like s key

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.
Post Reply
Message
Author
pkt
Veteran
Posts: 322
Joined: Tue Jul 28, 2009 10:09 pm
Completed: I dunno
Projects: Something special
Contact:

use python function for screenshot like s key

#1 Post by pkt »

I'm trying to save a screenshot to the default directory and have that get triggered about every half a second or so also trying to have a label gets called in the process.
the random all function...
http://www.mediafire.com/download/cd674 ... -_Mint.zip
http://www.mediafire.com/view/k7rsx14gg ... -_mint.rpy
Also may as well ask how to make sliders instead of buttons...had sliders in the game but I didn't know how to get them to update to the screen as they adjusted things...I seen it work before with an older renpy on an older version of the project before I lost my code but meh had to start over...
No Active Public Renpy Projects...

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: use python function for screenshot like s key

#2 Post by PyTom »

In Ren'Py, actions are just functions. So you could do Screenshot()() if you really wanted to.

Calling a label might get interesting, as you can't call labels from python code. You could renpy.call_in_new_context a label if you wanted to.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

pkt
Veteran
Posts: 322
Joined: Tue Jul 28, 2009 10:09 pm
Completed: I dunno
Projects: Something special
Contact:

Re: use python function for screenshot like s key

#3 Post by pkt »

so how could I call the screenshot function?
$ Screenshot()()
like that?
No Active Public Renpy Projects...

User avatar
PyTom
Ren'Py Creator
Posts: 16093
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: use python function for screenshot like s key

#4 Post by PyTom »

Yes, that will run the screenshot action.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

pkt
Veteran
Posts: 322
Joined: Tue Jul 28, 2009 10:09 pm
Completed: I dunno
Projects: Something special
Contact:

Re: use python function for screenshot like s key

#5 Post by pkt »

another question is how can I have delay on a screen that then later triggers a jump. I'm gonna use this for an image generator thing.
that screenshot thing didn't work but got some results...
$ renpy.screenshot(1)

but it still didn't make any screenshots show up anywhere I could see...
sorry... :/
No Active Public Renpy Projects...

Post Reply

Who is online

Users browsing this forum: Bing [Bot]