Hello, I’m wondering if it is possible to make the game recognize that two of the same objects are colliding with each other, repeated for multiple different objects?
I am trying to make a kind of 1024 game.
Basically I got it working by writing:
if: Object 1 collides with Object 1, then: create Object 2
if: Object 2 collides with Object 2, then: create Object 3
if: Object 3 collides with Object 3, then: create Object 4
But is it also possible to write it like this?
if: Object X collides with Object X, then: create Object X+1
Instead of creating a different object for every elevation of 2 it would be better to use a text object and just change its text.
Answering the question, yes, but anyone else would explain better than me.
Thanks for your answer!
I’m not actually using numbers in my game though, so I do need objects with sprites. Unless I am understanding your wrong, that means I cannot use text.
So, the concept consists of adding every object to a group and checking collision group to group, but you would have to find a way to check if the objects colliding in the group are the same object, the action is the easiest part, there is an action called “create object from its name”, you would have to do something like “Circle”+variable containing the number of the next circle to spawn.
Yeah, the action I think I can figure out, I creating object from name and adding something like “Circle”+ToString(1)
But I have no idea how to compare the string value in the condition, to see if they are the same.