Hi all, a friend of me made a racing game that has an editor. It is grid based and each grid has an OBJ file associated with that grid. Now, I need to import a track from his game into Blender. Here’s a sample of the track descriptor:
TRACK
h 3 1 0 0
i -2 5 0 0
t 2 5 0 0
l 2 6 0 0
The first character is the OBJ file to read. For example, replace ‘h’ with C:\OBJ\House.obj.
The second is the X position
The third is the Y position
The fourth is the rotation times 90
The fifth is nothing relevant.
I need a script that works like this:
while (not EOF)
read line
if line.beginswith(h):
load C:\OBJ\House.obj file with all default settings (from the import OBJ screen)
move X times… something in the X axis
move Y times… something in the Yaxis
rotate value*90 in Z axis
elif line.beginswith(i):
load another OBJ… the rest is the same
etc…
Is it possible to do it? If it’s not to ask too much, can anyone do it for me? :o Thanks!!