Shaking Screen?

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
KyuKuru
Newbie
Posts: 9
Joined: Tue Mar 06, 2007 4:07 pm
Contact:

Shaking Screen?

#1 Post by KyuKuru »

Hey when shaking the screen how do you tell ren'py how long to shake the screen before stopping?

Candle
Regular
Posts: 34
Joined: Thu Mar 08, 2007 1:46 pm
Contact:

#2 Post by Candle »

Might help.
http://www.renpy.org/wiki/renpy/doc/coo ... ake_effect
with Shake((0, 0, 0, 0), 3.0, dist=30)
# some serious shaking of the screen for 3 seconds
Administrator @ Adventure Maker

KyuKuru
Newbie
Posts: 9
Joined: Tue Mar 06, 2007 4:07 pm
Contact:

#3 Post by KyuKuru »

with Shake((0, 0, 0, 0), 3.0, dist=30)
# some serious shaking of the screen for 3 seconds
That is what I am talking about, it says shaking of the screen for 3 seconds, can I control that feature, like can I make it shake for only 1 or 2 seconds?

User avatar
PyTom
Ren'Py Creator
Posts: 16096
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:

#4 Post by PyTom »

You can change the amount of shaking by changing the 3.0 to some other number.

That also works for the built in shakes, similar to hpunch and vpunch.

Code: Select all

init:
    $ vpunch1s = Move((0, 10), (0, -10), .10, bounce=True, repeat=True, delay=1.0)
    $ hpunch1s = Move((15, 0), (-15, 0), .10, bounce=True, repeat=True, delay=1.0)
For both of these, the 1.0 is the amount of time to shake for, in seconds. The .10 is the amount of time per shake, while the 10 or 15 is the number of pixel to shake by.
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

KyuKuru
Newbie
Posts: 9
Joined: Tue Mar 06, 2007 4:07 pm
Contact:

#5 Post by KyuKuru »

Thanks, I see what I was doing wrong, but its fixed now, thanks alot

Post Reply

Who is online

Users browsing this forum: Google [Bot]