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:
screenset to"phone_say"who_styleset to"phone_say_label"what_styleset 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. Ifvideois true, a video call is started (this is ignored if the game is on a version prior to 7.5.0). Ifnosaveis true, the call won’t be saved to the call history. Replaces thenarratorwith a special narrator. The python equivalent of thephone callstatement.def end_call()Ends the current phone call, and registers it for both
*character*s (the caller and the current pov). Sets thenarratorback and clears the video call layer. The python equivalent of thephone end callstatement.def register_call(char1, char2, duration=None)Saves a call between the
*character*schar1andchar2. Ifdurationis notNone, it’s a float, a number of seconds the call lasted. This is called automatically by thephone.calls.end_callfunction.
Statements
phone callUsed to start a phone call. It expects a
*character*. If thevideoclause is given, a video call is started. If thenosaveclause is given, the call won’t be saved to the call history.phone end callUsed 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