Page 2 of 3

Re: Mobile phone text-message system

Posted: Sun Dec 11, 2016 5:37 pm
by noeinan
Wow, this is really, really cool! Thanks for sharing the code. :)

Would you be okay with me including this (with credit and a link to this thread) in my quick-start guide? It's a kind of all-in-one package meant to help beginner players access features that they aren't able to program themselves. (Link: viewtopic.php?f=51&t=22393&p=283217#p283217 )

Re: Mobile phone text-message system

Posted: Fri Dec 16, 2016 10:59 am
by Lord Dragon
The thread is kinda dead, but I've been able to move the phone along the screen and the messages with it however I haven't been able to move the replies along with the phone.

Image

Solved

Re: Mobile phone text-message system

Posted: Sun Dec 25, 2016 4:33 pm
by glithch
Lord Dragon wrote:The thread is kinda dead, but I've been able to move the phone along the screen and the messages with it however I haven't been able to move the replies along with the phone.

Image

Solved

im having similiar problem but i wanted to move the phone up q-q

Re: Mobile phone text-message system

Posted: Sun Feb 18, 2018 12:27 pm
by littanana
Image

New update! Code cleaned up, added bunch of comments. Supports images too. Check out the download, it's in the starting post.

Re: Mobile phone text-message system

Posted: Thu Mar 15, 2018 2:37 pm
by DragonKnight

Code: Select all

call phone_start
call message_start("[player_name]", "Hey, Mom and I are going out to eat.  Wanna come?")
call reply_message("[sister_name]", "Sure,  can we eat at Dad's favorite place?")
# this one is the same as the above one, but instead it has one more place for you to set an image
# you have to make the image be small enough to fit the screen or its gonna stretch weird!
call messa
How do you make the reply messages show who sent them. I have the outgoing messages taken care of (it is in the script). But I can't get the reply messages to show who sent them. I keep getting this:
problem2.png

Re: Mobile phone text-message system

Posted: Sun Mar 18, 2018 6:13 pm
by littanana
DragonKnight wrote: Thu Mar 15, 2018 2:37 pm

Code: Select all

call phone_start
call message_start("[player_name]", "Hey, Mom and I are going out to eat.  Wanna come?")
call reply_message("[sister_name]", "Sure,  can we eat at Dad's favorite place?")
# this one is the same as the above one, but instead it has one more place for you to set an image
# you have to make the image be small enough to fit the screen or its gonna stretch weird!
call messa
How do you make the reply messages show who sent them. I have the outgoing messages taken care of (it is in the script). But I can't get the reply messages to show who sent them. I keep getting this:
problem2.png
you're getting an error since you're putting two arguments in a call that only takes one

"reply_message" and "message" with "me" as the name are the person who is receiving the messages (so the player) you're using them the wrong way around. you dont need the name to show since its always the same person using the same phone.

if you want the player name to show instead of "me" change the label message in your options.rpy to this;

Code: Select all

label message(who, what):
    $ renpy.pause()
    hide screen phone_message
    hide screen phone_message2
    hide screen phone_message3
    hide screen phone_message_image
    $ renpy.pause(0.1)
    # if you want to change the players name to be something else than "me" you can change it here
    if who.lower() == "[player_name]": 
        show screen phone_message2(who, what)
    else:
        show screen phone_message(who, what)
    return

Re: Mobile phone text-message system

Posted: Fri Mar 23, 2018 6:50 am
by isay_coconut
Has anyone figured out how to make this fit for 1280x720 resolution?

Re: Mobile phone text-message system

Posted: Fri Mar 23, 2018 7:12 am
by littanana
isay_coconut wrote: Fri Mar 23, 2018 6:50 am Has anyone figured out how to make this fit for 1280x720 resolution?
you open the game up and go to screens.rpy and start playing with the numbers until it looks correct.
stuff like xalign, xsize and xoffset
maybe make the phone sprite a bit smaller in your image editor of choise

Re: Mobile phone text-message system

Posted: Sat Aug 11, 2018 11:52 pm
by margaretcatter
Help, I'm trying to do something I thought was a little easy. Below is my little bit of code.

Code: Select all

call phone_start

call message_start ("Karla", "Why don’t you have a lock on your phone? That’s like phone having 101 right here.")
call reply_message ("Eir", "Because it takes too long geez. Sometimes people are lazy aka mme and all I want to do is swipe and there it is. No fuss no muss.")
call message ("Karla", "Christ, how are you an adult?")
call reply_message ("Eir", "I ask myself that every day. One day I’m going to look up and realize I’m thirty and have no idea how that happened to me.")
call message("Karla", "It happens to the best of us.")
call reply_message("Karla", "Anyway i guess it’s a good thing that you don’t lock your phone. Also that in the year of twenty seventeen you have a landline. Like who even has one of those.")
call message("Eir" "It came with the apartment and its connected to my bell")
call reply_message("Karla" "I’m not judging its handy dandy for this exact moment.")
And this is the error I'm getting. I'm not sure what I'm doing wrong.

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 394, in script call
    call reply_message ("Eir", "Because it takes too long geez. Sometimes people are lazy aka mme and all I want to do is swipe and there it is. No fuss no muss.")
  File "game/options.rpy", line 319, in script
    label reply_message(what):
Exception: Too many arguments in call (expected 1, got 2).

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 394, in script call
    call reply_message ("Eir", "Because it takes too long geez. Sometimes people are lazy aka mme and all I want to do is swipe and there it is. No fuss no muss.")
  File "game/options.rpy", line 319, in script
    label reply_message(what):
  File "/Applications/renpy-6.99.14.3-sdk/renpy/ast.py", line 803, in execute
    values = apply_arguments(self.parameters, renpy.store._args, renpy.store._kwargs)
  File "/Applications/renpy-6.99.14.3-sdk/renpy/ast.py", line 152, in apply_arguments
    return parameters.apply(args, kwargs, ignore_errors)
  File "/Applications/renpy-6.99.14.3-sdk/renpy/ast.py", line 134, in apply
    raise Exception("Too many arguments in call (expected %d, got %d)." % (len(self.positional), len(args)))
Exception: Too many arguments in call (expected 1, got 2).

Darwin-16.6.0-x86_64-i386-64bit
Ren'Py 7.0.0.196
Hurricane Like Me 0.1
Sat Aug 11 23:03:22 2018

Re: Mobile phone text-message system

Posted: Sun Aug 12, 2018 11:21 pm
by littanana
margaretcatter wrote: Sat Aug 11, 2018 11:52 pm Help, I'm trying to do something I thought was a little easy. Below is my little bit of code.

Code: Select all

call phone_start

call message_start ("Karla", "Why don’t you have a lock on your phone? That’s like phone having 101 right here.")
call reply_message ("Eir", "Because it takes too long geez. Sometimes people are lazy aka mme and all I want to do is swipe and there it is. No fuss no muss.")
call message ("Karla", "Christ, how are you an adult?")
call reply_message ("Eir", "I ask myself that every day. One day I’m going to look up and realize I’m thirty and have no idea how that happened to me.")
call message("Karla", "It happens to the best of us.")
call reply_message("Karla", "Anyway i guess it’s a good thing that you don’t lock your phone. Also that in the year of twenty seventeen you have a landline. Like who even has one of those.")
call message("Eir" "It came with the apartment and its connected to my bell")
call reply_message("Karla" "I’m not judging its handy dandy for this exact moment.")
And this is the error I'm getting. I'm not sure what I'm doing wrong.

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 394, in script call
    call reply_message ("Eir", "Because it takes too long geez. Sometimes people are lazy aka mme and all I want to do is swipe and there it is. No fuss no muss.")
  File "game/options.rpy", line 319, in script
    label reply_message(what):
Exception: Too many arguments in call (expected 1, got 2).

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "game/script.rpy", line 394, in script call
    call reply_message ("Eir", "Because it takes too long geez. Sometimes people are lazy aka mme and all I want to do is swipe and there it is. No fuss no muss.")
  File "game/options.rpy", line 319, in script
    label reply_message(what):
  File "/Applications/renpy-6.99.14.3-sdk/renpy/ast.py", line 803, in execute
    values = apply_arguments(self.parameters, renpy.store._args, renpy.store._kwargs)
  File "/Applications/renpy-6.99.14.3-sdk/renpy/ast.py", line 152, in apply_arguments
    return parameters.apply(args, kwargs, ignore_errors)
  File "/Applications/renpy-6.99.14.3-sdk/renpy/ast.py", line 134, in apply
    raise Exception("Too many arguments in call (expected %d, got %d)." % (len(self.positional), len(args)))
Exception: Too many arguments in call (expected 1, got 2).

Darwin-16.6.0-x86_64-i386-64bit
Ren'Py 7.0.0.196
Hurricane Like Me 0.1
Sat Aug 11 23:03:22 2018
"call reply_message" only takes one parameter, ie only the dialogue. if you want the name to show also use "call message"

Re: Mobile phone text-message system

Posted: Tue Aug 28, 2018 9:33 am
by kully00000
Hi, first of all this is a great feature to have in a game so thank you.
I wanted to ask if and how it would be possible to enlarge sent images through the phone.
Right now when you send images they are small, is there any way to enlarge after you click on them?
Thanks,

Re: Mobile phone text-message system

Posted: Tue Aug 28, 2018 9:44 am
by littanana
kully00000 wrote: Tue Aug 28, 2018 9:33 am Hi, first of all this is a great feature to have in a game so thank you.
I wanted to ask if and how it would be possible to enlarge sent images through the phone.
Right now when you send images they are small, is there any way to enlarge after you click on them?
Thanks,
yeah its possible but i have no idea how you'll have to code it yourself ^^

Re: Mobile phone text-message system

Posted: Sat Feb 16, 2019 1:51 am
by sheetcakeghost
This is absolutely flippin' fantastic and will save me SO MUCH time with the texting system in my own game. Sincerely, I was not looking forward to making a separate image for each and every texting option.

Re: Mobile phone text-message system

Posted: Tue Apr 09, 2019 8:49 am
by ysa27
Hey there! I'm kinda wonderin' if there's a way to input a full image that isn't a message but a call? Does anyone know how to make it seem like there's a call instead of a message with the same coding from here?

Re: Mobile phone text-message system

Posted: Thu May 09, 2019 6:00 pm
by XxrenxX
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