This is a confusing subject for me, and i'm sure it has already been asnwered somewhere but here goes...
I have written a pathfinding routine for my Paradise Island game which creates a path in the following datatype
type AIpath
field x,z
end Type
This works fine except I want to have multiple units in the game all recording their own path, so I dimensioned a pointer for the datatype
dim path(unitQty).AIpath
The problem is that path().AIpath stores a pointer to the entire AIpath stack, rather than creating individual stacks for each unit.
Is there a way to dimension the data type itself? ie:
type AIpath(unitQty)
field x,z
end type
I have written a pathfinding routine for my Paradise Island game which creates a path in the following datatype
type AIpath
field x,z
end Type
This works fine except I want to have multiple units in the game all recording their own path, so I dimensioned a pointer for the datatype
dim path(unitQty).AIpath
The problem is that path().AIpath stores a pointer to the entire AIpath stack, rather than creating individual stacks for each unit.
Is there a way to dimension the data type itself? ie:
type AIpath(unitQty)
field x,z
end type