Hundreds of features to explore
Games made in Construct
Your questions answered
Popular & trusted by schools and Universities world-wide
Construct 3 runs in the browser & works offline
Students do not need accounts with us
Our educational partners
Free education resources to use in the classroom
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
Say I have a function that works for several objects, and these objects are in a family.
I need a way to figure out which member of the family is being used, or in my current line of thinking, I do. Is there a way to do this, or some clever method of determining this?
Adding a variable to this objects and setting a different value for each one to compare it later?
It might help to have some context - what do you mean by 'being used'?
Develop games in your browser. Powerful, performant & highly capable.
You mean if you had a family called 'pets' which contains 'cat' and 'dog' objects. And you want to know if the currently picked pets is a cat or dog?
You could do it with an event like this:
pick cat by uid pets.uid
It will only run if pets is a cat.
If I understood you correctly, you could do this:
.. familyMember1 pick by uid Family
.... Do stuff for familyMember 1
.. familyMember2 pick by uid Family
.... Do stuff for familyMember 2
Edit: The Hound beat me to it :)
Thanks everyone for all the help!
To elaborate more on what I'm trying to do - basically I'm creating a complicated snake. Except there are several snakes and I need to find out which snake I'm working with :)