Is there a way to run two pieces of code at once in python?
Zackyd00 (0)

So I want to create an achievement system for something im making, but want it to update as the main.py is running. Is there a way to do this?

You are viewing a single comment. View All
Coder100 (18922)

threading is what you want!

from threading import Thread

def func1():
  # your achievement code

def func2():
  # your normal game code

t1 = Thread(target = func1)
t2 = Thread(target = func2)

t1.start()
t2.start()