Please check the capx below. As you can see I have 2 families, one with monsters and one with ammo. And each member of each family has different properties defined in instance variables for each object ammo/monster type(the shape it is, circle, square, etc.), what color it has, and if it has any signs on it.
Then you will see I have one event AllAmmo on collision with AllMonsters.
I would like someone to please make the code there to show me how to do the following:
- when an ammo colides with a monster pick only the 2 members of each family that have just collided(as I understand C2 does this automatically because it's a triggered event and because of how families work?)
- then(on that collision) compare the instance variables of just those 2 members that have just colided to see if they are equal ammotype=monstertype, color=color, sign=sign(and remember these variables are on each object itself, not on the family)
- if all variables are equal call function x, else(if any of them is not equal) call function y
Capx link: https://www.dropbox.com/s/juvesdjguknqs ... .capx?dl=0
If you have any questions let me know. Thank you.