I'm trying to make my character portrait briefly "pulse" when that character first has a line of dialogue. This would be a brief indicator as to who's talking without having to look at the character's name (in my game there are many instances in which two characters are on screen and talking to each other). It wouldn't pulse every time the character speaks consecutively, just the first time. It's basically just to say "this is the character that is talking now".
The "pulse" would be a very very slight boost in the brightness of the character portrait for a few milliseconds before returning to normal. Unfortunately I have very little experience with manipulating displayables in ren'py.
From reading through the documentation I think https://www.renpy.org/doc/html/displaya ... brightness is what I'm supposed to be using, but I'm not too sure how to call upon it, and also to have the brightness boost last only for a few milliseconds.
This is example code of what I would want it to look like:
Code: Select all
define e = Character("Eileen")
define c = Character("Carl")
# The game starts here.
label start:
scene bg kitchen
show eileen at left
show carl at right
e "Hi I'm Eileen." #e pulse
c "And I'm Carl." #c pulse
e "I'm pulsing..." #e pulse
c "...and now I'M pulsing!" #c pulse
c "But now I'm not pulsing, since I'm the same person who spoke on the last line of dialogue." #c DOESN'T pulse
e "Oh I see. But now I'm pulsing!" #e pulse
e "...but not anymore." #e DOESN'T pulse
c "This is wild." #c pulse
# This ends the game.
return
Thanks!