I try to create a variable and then change the value in the gameplay, but that variable becomes constant and I can’t change it, I can’t use properties anyway (I already have a lot).
Example:
import bge
my_variable = 0.0
if any thing:
my_variable += 0.1
As far as I’m aware, Python doesn’t support static variables. If you put a print statement after your += 0.1 then you’ll find the variable has changed.
If that runs every frame, then it’ll always start at that value. It’s common to have a startup script that initialises variables in a global scope.
If you want to keep using something in your blend where ever you need it then you should use a globalDict to store those variables, you can even save and load it when it’s in the dict.