Is there a mechanical difference between Game and Scene Attributes for integers?

MoikMoik Member, PRO Posts: 257

So I was just loading up my project with all the elements I'll need, so I can just pull them out of the box and link them up like lego pieces, but I dumped all my various integer attributes under the Game tab. It doesn't seem to want to let me just drag them into the Scene tab.

Does the game actually care if the attributes are in a Scene if they're present in the Game tab?
Is there a benefit to re-making them in their specific Scenes and cutting them from the Game tab?

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273

    Scene attributes can only be accessed in the scene in which they were created in. A scene attribute would not be useful as a score. You'd have to create a score attribute in each scene, which is ridiculous. Game attributes can be accessed on any scene.

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934

    It's really just about organization and clean code. If your attribute might ever be a value you need in another scene or an attribute that will be used and changed consistently throughout the game then make it game attribute. If it is only going to ever apply to just that scene then make it a scene attribute.

    The thing to remember is the scene attributes cannot be accessed by prototype actors. So if your making your attributes in the scenes you then have to place and actor, unlock the actor, and then edit your rules to add the scene attribute.

    Hope that helps clear things a little for you.

  • MoikMoik Member, PRO Posts: 257

    Cool. That's kinda what I was suspecting. I'll probably just leave it like this then. It'll be harder to fix problems, but fewer problems should occur.

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934

    it definitely would be better for you to use game attributes in the beginning. once you start getting a feel for GS and how to build your logic you should start to see places you can use them as scene attributes instead to tidy things up.

  • JodyMitomaJodyMitoma Member Posts: 307
    edited May 2014

    I personally have zero scene attributes, as I find them useless when I can simply use game and actor attributes. ;) That's just me though! As my game sits now, I have 24 Game attributes - all of which are used in the game's levels, with more to come!

Sign In or Register to comment.