Quote: "How can i have an array that will contain different data in each element?"
An array is designed to have the same data in each element.
My suggestion would be:
Type tVector2
x as float
y as float
EndType
Type tPathPoint
pos as tVector2
angle as float
EndType
Type tPath
startPoint as tPathPoint
endPoint as tPathPoint
command as string[5]
EndType
global arrPath as tPath[100]
The array lengths can be adjusted to suit your needs.
The command sub-array will be a set of instructions understandable to your program. For example:
MOVE,3
ROTATE,-2.5
You can split these down into the parameters.
Examples....
arrPath[1].startPoint.pos.x = 1.5
y# = arrPath[3].startPoint.pos.y
endrot# = arrPath[1].endPoint.angle
arrPath[5].command[1] = "MOVE,2"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt