Game vs Scene Attributes

I am hoping someone can help me out with game vs scene attributes. I just noticed the following , after way too much time trying to figure out what was wrong.

Scenario

Two actors and one 'spawn count attribute'.

If the attribute is in GAME and you destroy the actor based on the spawn count, than the original actor AND spawned actor are destroyed. However, if you do the same when the spawn count attribute is in SCENE, only the original actor is destroyed. I.E. The spawned actor is not.

I started using scene attributes for a variety of reasons...to be honest it is probably due to the fact that I am a newbie and my coding looks like the 'dogs breakfast'.

My assumption is that GAME attributes impact the entire game/scenes and that SCENE attributes only impact the Scene. I did not expect the issue above. If anyone can educate me in this I would greatly appreciate it.

Cheers


Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited February 2013
    My assumption is that GAME attributes impact the entire game/scenes and that SCENE attributes only impact the Scene.
    This is true, but I'm still not following the problem you're having. If you are counting spawned actors, each actor would have a behavior Change Attribute game.spawnCount to game.spawnCount+1. Then, above the Destroy behavior -- if you're using it -- would be Change Attribute game.spawnCount to game.spawnCount-1. I suppose you could use a scene attribute for this but instead I would have an actor on each scene that "resets" the scene by changing attributes (e.g. Change Attribute game.spawnCount to 0) at the start of the scene.

    Edit: oh wait, I think I get it. I'm guessing that the spawned actors aren't able to access the scene attributes. Try it with a game attribute and let me know if it works for you. If not, post your rules (or a screenshot) and we'll go from there.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • PaxPaxPaxPax Member Posts: 106
    @Tatiang
    ...Edit: oh wait, I think I get it. I'm guessing that the spawned actors aren't able to access the scene attributes...

    yah that was what I uncovered. Using game attribute now.

    Thanks for the reply---I did think I was going nuts!!!

    Cheers

Sign In or Register to comment.