Object Arrays

For questions about using Classic.

Post » Mon Sep 07, 2009 11:01 pm

I'm working on a tactical game and I want to make it so there's an array of units, so I can choose the unit with the highest speed to go first down the line. I tried using the "array paste" feature, but it doesn't seem to really work since changing one object's image changes all of them and I want each character to have a different image. I can't find any documentation anywhere. Any help with this is most appreciated! Thanks!
Posts: 9
Reputation: 1,108

Post » Tue Sep 08, 2009 11:26 pm

Array paste pastes copies of an object in a rectangular arrangement. I don't see the relationship with choosing an object in runtime or changing its image, but I'll go on a limb and guess what you are trying to achieve.

If you want to have different unit types and each with a different maxspeed and be able to choose based on this maxspeed, you might want to:
-make each unit type a different object, so they can look and behave different from each other.
-put all of these units in a family, so you can select among them with no distinction.
-set some common variables to the family, among them maxspeed.

Then you would pick the family and within that the one with the largest maxspeed variable.
Posts: 1,445
Reputation: 4,665

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests