
I am a disciple of Christ Jesus the Lord and Saviour!!!
-
Splefix
Yes, but it is okay. I will just use the time module instead. Thank you all for your help. God bless you all in Jesus Christ’s MIGHTY NAME!!!!
-
Splefix
@mikael Hey man, I did that, but now I get the following error:
- Name 'script' is not defined
This concerns the following code:
@script def do_a_thing_every_second(self): if self.auto_amount >= 1: while(True): spawn_bubble(self, False) yield 1.0
-
Splefix
@mikael Hey sorry man, I am new to Pythonista, especially concerning the installation you are talking about. Can you please help me install scripter? If it isn’t too much trouble. I haven’t worked with github before either.
-
Splefix
@mikael Hi friend, I am having trouble with importing scripter? It says that this is invalid syntax:
from scripter import *
-
Splefix
@JonB Concerning your question above: Can you show me how to update the text? This is my first time using the scene module.
Also, say I have two args, and the function is out of the MyScene class: How would I tackle this?
-
Splefix
@JonB Hey, can I ask you to show me an example of calling a method containing args using the example you gave me above?
-
Splefix
@musicman305 Haha brother, God just helped me figure that out myself! Thank you very much though for your answer! God bless you abundantly and may peace be with you!!!
Nice meeting you brother!
-
Splefix
Here is the code for the update subclass:
def update(self): self.score_label.run_action(Action.remove()) self.goal_label.run_action(Action.remove()) self.score_label = LabelNode(str(f'Score: {self.score}'), ('Arial Rounded MT Bold', 33), position=(self.size.x/2, (self.size.y/1)-133)) self.goal_label = LabelNode(f'Goal: {self.goal}', position=(self.size.x/2, ((self.size.y/1)-133)+50)) self.add_child(self.score_label) self.add_child(self.goal_label) if self.auto_amount >= 1: spawn_bubble(self, False) if self.chest_visible == True: if self.score >= self.goal: buy_automate_chest = SpriteNode('plc:Chest_Open', position=(self.size.x/2, self.size.y/5), parent=self) self.chest_location = buy_automate_chest.frame else: buy_automate_chest.run_action(Action.remove())```
-
Splefix
Basically, I want to add a point every 1 second automatically if a statement is currently true. How can I do this?
-
Splefix
@cvp Yield causes the LabelNodes to disappear, and other code seems to stop working when using it in the scene.update function. Do you maybe know why?