Table of Contents

Function Definition: think(message = "Hello!", time)


NameTypeDescriptionExpected ValuesDefault Value
messagestringThe text you want to write.String"Hello!"
timeintTime for which the message is displayed. If value is 0 then the sprite will say until another speech or thought block is activated, or the stop sign is pressed.Integer0


The function gives its sprite a thought bubble with the specified text, which stays for the specified amount of seconds.

If the value of time is 0 then, the thought bubble stays until a speech or thought block with its text block empty is activated, or the stop sign is pressed.


The example demonstrates how to use say and think of sprite in a project.


sprite = Sprite('Tobi')
import time

sprite.say("Saying for 2 seconds", 2)
sprite.say("Saying forever")

sprite.think("Thinking for 2 seconds", 2)
sprite.think("Thinking forever")


Read More
All articles loaded
No more articles to load