Phone calls
The following functions are defined in the phone.calls namespace (not phone.call, Ren’Py doesn’t like me using that).
Phone calls require a certain type of sayer. The need those 3 properties:
screen
set to"phone_say"
who_style
set to"phone_say_label"
what_style
set to"phone_say_dialogue"
The rest is as usual.
define phone_eileen = Character("Eileen", screen="phone_say", who_style="phone_say_label", what_style="phone_say_dialogue")
Functions
def call(caller, video=False, nosave=False)
Starts a phone call with the
*character*
caller
. Ifvideo
is true, a video call is started (this is ignored if the game is on a version prior to 7.5.0). Ifnosave
is true, the call won’t be saved to the call history. Replaces thenarrator
with a special narrator. The python equivalent of thephone call
statement.def end_call()
Ends the current phone call, and registers it for both
*character*
s (the caller and the current pov). Sets thenarrator
back and clears the video call layer. The python equivalent of thephone end call
statement.def register_call(char1, char2, duration=None)
Saves a call between the
*character*
schar1
andchar2
. Ifduration
is notNone
, it’s a float, a number of seconds the call lasted. This is called automatically by thephone.calls.end_call
function.
Statements
phone call
Used to start a phone call. It expects a
*character*
. If thevideo
clause is given, a video call is started. If thenosave
clause is given, the call won’t be saved to the call history.phone end call
Used to end a phone call. It doesn’t expect anything.
Example
# define two phone sayers
define phone_s = Character("Sayori", screen="phone_say", who_style="phone_say_label", what_style="phone_say_dialogue")
define phone_mc = Character("MC", screen="phone_say", who_style="phone_say_label", what_style="phone_say_dialogue")
# create the two phone characters
default pc_sayori = phone.character.Character("Sayori", phone.asset("sayori_icon.png"), "s", 21, "#22Abf8")
default pc_mc = phone.character.Character("MC", phone.asset("mc_icon.png"), "mc", 35, "#484848")
label phone_call_test:
phone call "s"
phone_s "Ohayouuu!!!!!!!!!!!!!!!!"
phone_mc "Hey!"
"Why is she always this energetic?"
phone end call
"..."
return
label phone_video_call_test:
show sayori onlayer phone_video_call
show bg sayori_room onlayer phone_video_call
phone call "s" video
phone_s "Hey! That's my room"
phone end call
"..."
return