Question about armory example(file read)

Hi… I’m first here.:joy:

My questuion is “Why did I receive unexpected results?”
- Change the contents of a text file every 0.5 seconds (ChangingValue.py)
- Play armory3d to read the text file (MoveTrait.hx)


- I expected changing trace(value), but never changed

Armory does not execute any Python while your game is running. Python can execute in the environment of the Blender editor and make changes to your scene before you run the game, but it can never actually effect your running game. It runs in Blender not in your Armory game.

Oh, now I see, you are running the python script to change the file outside of your game. In that case, maybe the blob is getting cached by Kha… I don’t know. :confused:

Loading blobs is usually used for game assets, in which case it would usually make sense to only load the asset once, and to load it from cache if an attempt is made to load it again. Maybe that is why it is doing that.

If you are wanting to load save data then the Kha Storage API is built for that, so you might try that.