SOLVED - How do I set behavior variable once across layouts?

0 favourites
  • 4 posts
From the Asset Store
Change the size and position of everything without calculating anything!
  • I think I'm about to learn a hard lesson, but here goes...

    I have a game with multiple levels and level is a new layout. Across each layout I use many of the same sprite objects. For example, there is a sprite called "Turret" with a turret behavior on it.

    After working on the game (and several levels) for a while, I decided I wanted to change the rate of fire for the turret object.

    Only to discover, that I was just changing that value for that turret on that specific level/layout. And, this is just one example of many.

    There must be a better way to do this. I will have many levels/layouts with many objects. How do I set it up, so I can just set the values once.

  • set the turret variable on start of layout to a global variable value.

  • If you mean you are making a design change on the rate of fire, vs one that evolves during the game, you make sure all your turrets are based on the same template and then adjust that template. If you want the rate of fire to evolve during the game use Lions method.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • set the turret variable on start of layout to a global variable value.

    I can see where this would work great, if it was just a couple of variables I was concerned about. But, I have a lot that might change as I work through all the levels.

    If you mean you are making a design change on the rate of fire, vs one that evolves during the game, you make sure all your turrets are based on the same template and then adjust that template. If you want the rate of fire to evolve during the game use Lions method.

    Templates are just what I needed. I had heard of them, but hadn't played with them before. I just did a deep dive, updated my game, and I think this will work perfectly.

    Thank you both.

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