Thanks Lucid, that really helped me a lot. It also opened a whole new can of worms such as saving different patterns of spites for a level in a new array and saving loading these, I will keep persevering.
Actually may as well ask this question what would be an efficient method to save these sprite X,Y position values into different group of arrays.
i.e.
Group1 has x number sprites in XY location
Group2 has x number sprites in XY locations
...and so on.
To further explain, your map editor helps with the saving and loading sprites but what about when you have different sprite layouts that will be triggered by different conditions at runtime..So eventually Group2 is trigger when a certain X postion of another sprite is met for example. This is what I?m struggling with now.
I think when I get my head round this then the rest should fall into place.
Thanks for any guidance.
for each object in array (pick current)
add your pv to the "end" of your private variable array
upon loading all sprites to new instances
for each string (or number) in your private variable array (let's say this loop is called "myloop")
-----pick {"yourobjectarray",.li("myloop")} as yourFamily
-----set yourFamily's PV to .n({"yourprivatevariablearray",.li("myloop")})[/code:2cl62cwh]
that should assign each sprite with the original private variable it had, regardless of what type of sprite as long as it was a member of yourFamily
alternatively, once you're fairly comfortable with the 's', depending on what pv features you do and don't need, you may consider not using PVs at all, and just using 's' arrays to begin with. but the above solution would work.
let me know if my pseudocode made no sense, and I'll go into more detail