View Single Post
Old 28th March 2018, 18:27   #8
Nitorami
Major Dude
 
Join Date: Mar 2008
Location: Erlangen
Posts: 856
Quote:
Then i got extra mad about it when the instance value did not work in logical ifs
It works for me, instance just increments from 0... num_inst-1. Take care to use the C style == operator for comparison, e.g

if (instance ==0, do something, do something else);

But the best way to handle this is normally to calculate all shape positions in the per frame section in a loop and to store them to the gmegabuf array. Then in the shape section all you need to do is to read the array and assign the values to x and y accordingly.

n = 0;
loop (100,
gmegabuf(2*n) = rand(1);
gmegabuf(2*n+1) = rand(1);
n +=1;
)
Nitorami is offline   Reply With Quote