hpunch in MultipleTransition

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
martingerdes
Regular
Posts: 26
Joined: Sun Oct 07, 2018 5:14 am
Contact:

hpunch in MultipleTransition

#1 Post by martingerdes »

A simple question, but apparently too specialized to have been asked before.

I want to give a visual effect to a slap.

This works:
scene picturename with Fade(.1, 0.0, .1, color="#000")
scene picturename with hpunch

However, I like to make my code pretty, so tried to make a custom transform so that the code for the event looks cleaner:

define slap=MultipleTransition([False,Fade(.1, 0.0, .1, color="#000"),False,hpunch,True])

To be able to use in the event:
scene picturename with slap

However, this does not work. The fade effect is there, but no screen shaking is visible.
I tried adding in a pause to make this obvious:
define slap=MultipleTransition([False,Fade(.1, 0.0, .1, color="#000"),False,hpunch,False,Pause(1.0),True])
->pauses a second before the next line of dialogue appears, but the screen does not shake.

Now obviously this is not important for me, since I have a working solution (just calling scene twice). But I'd like to know whether I misunderstand how MultipleTransition works, whether there is a limit to the kind of transformations it can be applied to, or whether I have actually found a bug.

Thanks to anybody who can satisfy my curiosity! :roll:

Post Reply

Who is online

Users browsing this forum: Google [Bot]