I currently have this python function defined:
Code: Select all
init python:
def texting_animation(post):
if post.int_name == "kaw1":
renpy.pause(1.0)
renpy.show_text("[kawa_mess1.content1]", xalign=0.5, yalign=0.3)
renpy.show("profilepic/kawapfp.webp", xalign=0.4, yalign=0.3)
renpy.pause(1.0)
renpy.show_text("[kawa_mess1.content2]", xalign=0.5, yalign=0.2)
renpy.show("profilepic/kawapfp.webp", xalign=0.4, yalign=0.2)
renpy.pause(1.0)
renpy.show_text("[kawa_mess1.content3]", xalign=0.5, yalign=0.1)
renpy.show("profilepic/kawapfp.webp", xalign=0.4, yalign=0.1)
else:
pass
Now, this function is called as such in a screen:
Code: Select all
screen kawa_mes1:
add "hud/convo_bg.webp"
modal True
key "e" action [Hide("kawa_mes1"), Show("phone_trigger"), With(dissolve)]
python:
if kfirstmess_seenflag:
texting_animation(post)
else:
pass
I'm sorry, but an uncaught exception occurred.
I'm kind of lost? What's exactly the issue here? If it helps, here is the Post class definition:While running game code:
File "game/script.rpy", line 34, in script
e "if you are reading this, kawa sent you smt funny."
File "game/screensnscripts/screenss.rpy", line 91, in execute
screen kawa_mes1:
File "game/screensnscripts/screenss.rpy", line 91, in execute
screen kawa_mes1:
File "game/screensnscripts/screenss.rpy", line 96, in execute
python:
File "game/screensnscripts/screenss.rpy", line 100, in <module>
texting_animation(post)
NameError: name 'post' is not defined
Code: Select all
init python:
class Post:
def __init__(self, int_name, attachment, topic, content1, content2, content3):
self.int_name = int_name
self.attachment = attachment
self.topic = topic
self.content1 = content1
self.content2 = content2
self.content3 = content3