Got it. Turns out my directory WAS off. I did a little experimenting, and I guess they automatically save and open from desktop. I didn’t know this, so my saved file was trying to go like this:
C:/Users/Britany/Desktop/C:/Users/Britany/Desktop/ on so on…
DirectStart: Starting the game.
Known pipe types:
(all display modules loaded.)
Traceback (most recent call last):
File "maincourse.py", line 530, in <module>
w = World()
File "maincourse.py", line 97, in __init__
TypeError: NodePath.setPos() argument 1 must be VBase3, not list
**** End of process output ****
readLines gives you a list of strings, one for each line in the file. That list will need further processing to get it back into the form of floats or VBase3 instances. The error message is telling you this when it says “argument 1 must be VBase3, not list”. A simple parsing loop might look something like this:
for line in self.SavedPos:
# strip spaces out of the string
line = line.replace(" ", "")
# split into three strings split at the commas
xstr, ystr, zstr = line.split(",")
# convert the strings to float values and create a Pos3 object
pos = Pos3(float(xstr), float(ystr), float(zstr))
# set the position
Okay, so you only had one nodepath in your code so with multiple positions you’ll have to work out how to decide what nodepaths to apply them to in what order.
I found I could just write pieces of a text in a task, then continue it forever, that way my text files update every frame. I did that, and separated everything by using \n for a new row.
Then I just read the text file, and used certain lines from their. Works great.