vpunch/hpunch on just one character, and simultaneous events

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
delenir
Newbie
Posts: 4
Joined: Fri Feb 13, 2015 12:06 pm
Contact:

vpunch/hpunch on just one character, and simultaneous events

#1 Post by delenir » Fri Feb 13, 2015 12:14 pm

Hello everyone! I've been messing around with renpy for a few weeks now, and finally decided to break down and ask the experts for some advice...

My first question is about vpunch/hpunch. To put it simply, I'm wondering if there's a way to have this effect occur on just one character/image, rather than the whole screen?

Second question is about having two move events happening at the same time. Namely, having one character do a movein, while at the same time another character is doing a moveout, for a swapping type of effect.

Thank you in advance to anyone who has given my questions a look!

User avatar
deliciumartis
Regular
Posts: 30
Joined: Mon Feb 09, 2015 11:32 am
Location: shadowland
Contact:

Re: vpunch/hpunch on just one character, and simultaneous ev

#2 Post by deliciumartis » Fri Feb 13, 2015 9:53 pm

Have you checked here yet?
http://www.renpy.org/doc/html/transitions.html
there's a section for multiple transitions that does a pretty good job of explaining the how of it. As to the shake, there's a sample code here:
http://www.renpy.org/wiki/renpy/doc/coo ... ake_effect
that should set you in the right direction as to how to do it.
"What bothers me is, nothin' does."
--The dixie flatline

delenir
Newbie
Posts: 4
Joined: Fri Feb 13, 2015 12:06 pm
Contact:

Re: vpunch/hpunch on just one character, and simultaneous ev

#3 Post by delenir » Sat Feb 14, 2015 10:36 am

I did see the Phoenix Wright tutorial one, however that still affects the whole screen rather than the individual image. I may need to just experiment a little more with the basic Move command and see if I can manually get the effect I'm after... Thank you for your reply however!

User avatar
nyaatrap
Crawling Chaos
Posts: 1824
Joined: Mon Feb 13, 2012 5:37 am
Location: Kimashi Tower, Japan
Contact:

Re: vpunch/hpunch on just one character, and simultaneous ev

#4 Post by nyaatrap » Sat Feb 14, 2015 10:50 am

You can apply transition on a specific layer using ren'py.transition() statement.
If you want to apply animations on a single image, use transforms (At clause) instead of transitions (With clause).

User avatar
Donmai
Eileen-Class Veteran
Posts: 1919
Joined: Sun Jun 10, 2012 1:45 am
Completed: Toire No Hanako, Li'l Red [NaNoRenO 2013], The One in LOVE [NaNoRenO 2014], Running Blade [NaNoRenO 2016], The Other Question, To The Girl With Sunflowers
Projects: Slumberland
Location: Brazil
Contact:

Re: vpunch/hpunch on just one character, and simultaneous ev

#5 Post by Donmai » Sat Feb 14, 2015 12:39 pm

Usually, ATL transforms are more flexible than old transitions. You can use this transform to make a character "tremble" with fear or excitement:

Code: Select all

transform tremble:
        alpha 1.0 xoffset 0
        choice:
            block:
                linear 0.05 xoffset 10
                linear 0.05 xoffset -10
                repeat 2
            block:    
                choice:
                    linear 0.05 xoffset 10
                    linear 0.05 xoffset -10
                    repeat 2
                choice:
                    linear 0.05 xoffset 10
                    linear 0.05 xoffset -10
                    linear 0.05 xoffset 10                    
                    repeat 2
        choice:
            block:
                linear 0.05 xoffset -10
                linear 0.05 xoffset 10
                repeat 2
            block:
                choice:
                    linear 0.05 xoffset -10
                    linear 0.05 xoffset 10
                    repeat 2        
                choice:
                    linear 0.05 xoffset -10                    
                    linear 0.05 xoffset 10
                    linear 0.05 xoffset -10
                    repeat 2
        linear 0.07 xoffset 0
Then you would use it this way:

Code: Select all

show eileen shocked at tremble, center
e "What?"
http://www.renpy.org/doc/html/atl.html
Image
No, sorry! You must be mistaking me for someone else.
TOIRE NO HANAKO (A Story About Fear)

delenir
Newbie
Posts: 4
Joined: Fri Feb 13, 2015 12:06 pm
Contact:

Re: vpunch/hpunch on just one character, and simultaneous ev

#6 Post by delenir » Sun Feb 15, 2015 4:43 pm

Thank you both very much for your replies! I'm glad to know it can be done. I'll try both of those, and do some further research on ATL and transforms, thank you again! I'll be sure to post a reply with my results (hopefully by tomorrow!)

Post Reply

Who is online

Users browsing this forum: _ticlock_