Interact with created objects

Hi Guys,

i’m stil working on my City Builder like Game in the Style of “Dorfromantik”, where the Player can create different platforms and stuff like this. Now I want to integrate a function that the platforms can get older, cause tree are getting older, as everybody know. I integrate a roundbased function which is working pretty well. Now to my problem: Is there a possibility to “interact” with created objects? So if the player put down a plattform (with creat object at postion X Y), is there a possibility to interact with one specific platform? So that not every e.g. birch - platform change its animation.

Hopefully there is a solution for this problem.

your Badger Boy :badger:

Hello, badger_boy

I don’t know if I understood correctly, but when you use the create objects action in an event, Gdevelop filters and takes into account only the instances that were created. So, the actions for that object below creation on that same event will only occur on created instances. Example:

My preview before pressing a:

After pressing a:

If you need to make the changes in another event you could use a boolean variable. Example:

The variable will starts false:

after press a to create the new instances:

after pressing b to change the animation:

1 Like