Mobile phone text-message system

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Message
Author
ysa27
Newbie
Posts: 5
Joined: Thu Jan 10, 2019 9:28 pm
Deviantart: ysa27
Contact:

Re: Mobile phone text-message system

#31 Post by ysa27 » Thu May 16, 2019 12:57 pm

XxrenxX wrote:
Thu May 09, 2019 6:00 pm
ysa27 wrote:
Tue Apr 09, 2019 8:49 am
It might be easier to just define an image for calls with the names on them and use the show function like you would with sprites since calls can use the regular dialogue box. I'm curious though so I'm playing around with code to see if possible but it's be more code than defining images I think.

Edit=========

finished code

I've also done some minor changes to the call labels for the texting feature which is simple enough of an edit but thought would include in case anyone else wants it.

Code: Select all

label message_start(who, what):
    if who.lower() == "me": #this allows the player to text first
        show screen phone_message3(what)
    if who.lower() == "unknown": #this allows an image text to appear first
        show screen phone_message_image(who, what, img)
    else:
        show screen phone_message(who, what)
    return
if who.lower() == "me":

I have set for only what so that there isn't the "me" text on the screen cause I've never used a cell that says my own name in the text so included that as a personal preference. And it works how intended.

I've also discovered you can jump between the cell and dialogue if you need to.

Code: Select all

call phone_start
call message_start("Human", "Text")
pause #ensures player has to click to continue
"Dialogue will appear without the phone or text disappearing."
call reply_message(" text")
call phone_end
Thank you so much! I'll test this out right away uwu

Post Reply

Who is online

Users browsing this forum: No registered users