Hi!
I have the following code triggered by a message from a third party.
The line “sprite.play_flipbook(“face#mouth”, “mouth1”)” triggers the message function- in fact, when I don’t grey out the second “sprite.play_flipbook(“face#mouth”, “mouth2”)”, the message function loops indefinitely.
Can any one say why this is?
Thanks!
function on_message(self, message_id, message, sender)
print("psych x recd")
if self.xed == false then
self.xed = true
go.set("mushrooms", "position.z", 0)
go.set("liney", "position.z", 0)
go.set("liney1", "position.z", 0)
sprite.play_flipbook("face#mouth", "mouth1")
else
--sprite.play_flipbook("face#mouth", "mouth2")
go.set("mushrooms", "position.z", -100000)
go.set("liney", "position.z", -100000)
go.set("liney1", "position.z", -100000)
end
end