Page 1 of 1

[solved] My game has to be "auto forward". Codes are not working?

Posted: Wed Oct 10, 2018 1:06 pm
by Nanahs
So, I'm working on a text based game. A messenger game.

I'm using this one (version1):

viewtopic.php?f=51&t=50153

To be more realistic, I wanted the game to "auto forward" the messages to seem more real when a charater sends you a message.

I tried adding "{w=2.0}{nw}" after the message.

I tried " $ renpy.pause ()"

I tried adding this in the options:

Code: Select all

default preferences.afm_time = 5
default preferences.afm_enable = True 
Absolutely nothing works. Does anyone know what I should do?
I wanted the game to be "auto forward" without having to choose this option on menu. That would make the messeger seem more real.

Thanks :)

Re: My game has to be "auto forward". Codes are not working?

Posted: Wed Oct 10, 2018 2:24 pm
by IrinaLazareva
try to replace msg() function in messenger.rpy

Code: Select all

    def msg(txt, who=False, sound=False, p=None):
        store.m_msg.append((who, txt, sound))
        store.yadj.value = store.yadj.range+300
        renpy.restart_interaction()
        if who:
            renpy.play("new_message.mp3", "sound")
        renpy.pause(p)
And then:

Code: Select all

    python:
        msg("Hello?", who=True)     
        msg("Yes, who are you please?", p=3)    
        msg("I'm Bla bla.", who=True)    
        msg("How are you?", p=2)       
        msg("etc......", who=True)   
Where p is time to wait in seconds.

P.S. By the way, be carefuly. My antivirus found bad traces in this project

Re: My game has to be "auto forward". Codes are not working?

Posted: Wed Oct 10, 2018 5:22 pm
by Nanahs
IrinaLazareva wrote: Wed Oct 10, 2018 2:24 pm try to replace msg() function in messenger.rpy

Code: Select all

    def msg(txt, who=False, sound=False, p=None):
        store.m_msg.append((who, txt, sound))
        store.yadj.value = store.yadj.range+300
        renpy.restart_interaction()
        if who:
            renpy.play("new_message.mp3", "sound")
        renpy.pause(p)
And then:

Code: Select all

    python:
        msg("Hello?", who=True)     
        msg("Yes, who are you please?", p=3)    
        msg("I'm Bla bla.", who=True)    
        msg("How are you?", p=2)       
        msg("etc......", who=True)   
Where p is time to wait in seconds.

P.S. By the way, be carefuly. My antivirus found bad traces in this project
Thank you so much for your help! And also for the warning. I'll give it a look :)