How do I update all of an objects bullet speeds?

0 favourites
  • 5 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • I'm still learning how to use this program so I've decided to just modify the beginners tutorial game. I have this problem where only the newly created monsters are having their bullet speed updated overtime. So if a monster spawns and I have monster bullet speed set at 110 then that's how it spawns while the ones already spawned stay at 80. Anyone know what I'm doing wrong here?

  • Are you changing the bullet speed through events? It stands to reason that if older monsters aren't affected by those events (e.g. if events only run for when a new monster is spawned) then they'll remain unchanged. Can't really say for certain without seeing how the events are set up, though.

  • The Monster's speed is set when the new monster in created. After that, the monster's speed is not updated. If you want all monster's speed to update, you can use an event on Every Tick (either use the one already made or make a new one) and do the action: Monster > Set Movement speed > to MonsterSpeed. Since no particular Monster was "picked", this will apply to all Monsters. In the case where one was created, it also gets "picked", so the next action only sets the speed for that Monster.

  • The Monster's speed is set when the new monster in created. After that, the monster's speed is not updated. If you want all monster's speed to update, you can use an event on Every Tick (either use the one already made or make a new one) and do the action: Monster > Set Movement speed > to MonsterSpeed. Since no particular Monster was "picked", this will apply to all Monsters. In the case where one was created, it also gets "picked", so the next action only sets the speed for that Monster.

    Thanks so much I can't believe I didn't realize that!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I would approach this differently. I would create a Global Variable called "Speed" and set its value to e.g 400.

    Then i'll create a condition saying "every tick" > set playersprite bullet speed to ""Speed". (It should get its speed value from the global variable we created.)

    Now you can create multiple objects or whatever and link their bullet speed to the global speed variable. Now whenever you want to change the speed. Just create a condition and set the 'speed' variable value to something else. This way you can change the speed of multiple objects at once without any trouble.

    hope this helps you.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)