Spawned objects don't change

Hello everyone i’m mtrying to make and endless running, and i found a problem that i can’t solve with the spawned actors, sometimes the character need to stop for a combat so the scenary and other objects and coins also need to stop, with the scenary i don’t have any problem but when i try to change the speed of the spawned coins just affects to the master one instead all of the coins have been spawned, if somebody know how to make the bool who change the speed affects to all spawned objects please let me know i’ve been a week with this

It looks like you’re only changing the first instance parameters, you need to keep track of your spawned actors (keep them in an array) and then use a foreach and update their values one by one.
You can also use an event dispatcher to update them all at the same time.

1 Like

yes but how can i keep them in an array, by the spawner?

I think there is a main concept you are missing here.
For an endless running game, the trigger of spawning new object is hitting the trigger of every platform you are spawning. What i mean is that you have a main platform that you are spawning over and over, and that platform will have a trigger at the end that will be the trigger to spawn a new object. So when you hit that trigger you know that a new object must be spawned, and when you stop for the combat, you will not be spawning any object because this trigger is not hit.

1 Like

actually i don’t spawn floor i rotate the material on X and the main character it’s always on the same position, my problem is with coins i give them speed on X and change the speed depending on the situation, but just affects to the original coin, the spawned coins didn’t get affected

What do you mean by original coin?
Can you share a screenshot of how you’re changing the coin’s speed?

1 Like

Oh i fixed finally what i did is change the speed on the spawnactor and now seems there is no problem, thanks all of you guys for your help

2 Likes