Each 'new' instance creates 'new' variables to store 'X' and 'Y' values if you have defined them in your type definition.
If the same values are being used for each instance then you are doing something wrong.
How about a simple test where you define a type, create 2 instances and, using whatever method you prefer, set their
x/y values to be something different.
If you still have a problem then post that simple test code so we know what you're doing.
If you are using RND then don't forget to seedrnd.
If the same values are being used for each instance then you are doing something wrong.
How about a simple test where you define a type, create 2 instances and, using whatever method you prefer, set their
x/y values to be something different.
If you still have a problem then post that simple test code so we know what you're doing.
Type ttest Field x Field y Function Create:ttest(x,y) Local temp:TTEST = New ttest temp.x = x temp.y = y Return temp End Function End Type Local playership:ttest = ttest.create(100,100) Local enemyship:ttest = ttest.create(400,400) Print "Playership : " + playership.x + " " + playership.y Print "Enemyship : " + enemyship.x + " " + enemyship.y
If you are using RND then don't forget to seedrnd.