Braid-like time mechanics for N objects

For questions about using Classic.

Post » Sat Oct 23, 2010 4:59 pm


I have been trying to implement more braid-like mechanics in construct but I have run into some problems.

#1 I cant get the method to scale for N objects. The idea is that we save the location of each object every tick. How would I automatically create an array for each object depending on how many objects I have?

For example, in the cap file below i have doors and keys. If i wanted an infinite number of doors and keys, how would this be implemented?

#2 For multiple instances of the same object, does each instance have its own private variables? If so, is there a way to reference a particular instance of an object?

CAP file here:
1) construct 99.96
2) 'S' plugin
3) 'path' plugin
Posts: 24
Reputation: 698

Post » Thu Nov 11, 2010 12:08 am

Better late than never I guess.
You should check out containers. If you add an array, you can set it up as a container for your sprite.
Each created sprite will then have its own array.
To pick the sprite, and the array use a private variable.
>- system create sprite
>-- sprite set (private variable) or
For existing instances in the editor, click it and change it's pv.

Then during runtime pick via the variable.
>-sprite compare private variable >=< n
>--array do this....

Supposedly once something is picked its container is too.
Image ImageImage
Posts: 8,630
Reputation: 124,536

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 8 guests