GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Character question (instance vs. prototype)

tjjunior21tjjunior21 Posts: 50Member, PRO
edited January 2015 in Working with GS (PC)

I noticed that when I create characters the editing gets confusing. For example, lets say I create a person in the character section - call it person. When I highlight the character and I click on the actor tab located at the bottom on the screen I can adjust some of the attributes. However, it I click on the character and drag it on the screen and come back to it, the attributes are different in the actor section along the bottom. If I click on the actor under the library it was the original setting. Is there a reason for this and should I edit my character entirely before placing it on the screen.

Also my backstage at times switches from prototype to instance. What does that mean?

Lastly.... sorry for all the questions - when you create various scenes and characters, are all the characters available with every scene? It seems like if I use the same character for a different scene it has the same attributes for a scene I already created.

Sorry for some many questions.... just trying to figure out GS.

Thanks!

Comments

  • tatiangtatiang Posts: 11,842Member, Sous Chef, PRO, Senior Sous-Chef

    Prototypes are like blueprints for actors. When you set rules or attributes for a prototype actor in the Library, those rules and attributes carry over to any copies you drag onto the scene as well as any copies that are spawned.

    Instances are unique copies of an actor with unique rules and/or attributes. You create an instance by double-clicking on an actor in a scene and unlocking it. You can then change that single actor's rules and/or attributes without affecting the prototype nor any other individual copies in the scene.

    Imagine for example that you have six evil frogs in a scene and one of them is the boss frog and therefore has more health and attacks more frequently. You might unlock the seventh frog in the scene, adjust its self.Health and change a timer or rule condition to have it attack more often.

    When you add an actor to a scene, it uses the prototype attributes. If you use game attributes (aka global variables), those remain the same from scene to scene unless you change their values.

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

  • tjjunior21tjjunior21 Posts: 50Member, PRO

    That makes sense... thank you.

    So if I create some attribute for a character in a specific scene. Let's say it was under the prototype. If I use the same character but want it to do something different in a different scene I should use the instance mode - correct?

  • tatiangtatiang Posts: 11,842Member, Sous Chef, PRO, Senior Sous-Chef

    Yes, that's correct. It's entirely possible to create an attribute that only certain instances use or that each instance has a different value for, such as self.Health or self.Speed.

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

  • tjjunior21tjjunior21 Posts: 50Member, PRO

    One more question... I did exactly what you said. I double clicked on my character and added an attribute that I wanted it to do. However, I deleted all the other attributes because it was in prototype. Since the character is still within the same scene, should I have left all the other attributes?

    The reason I say this is my character doesn't move now but it does what I put in under the instance.

  • tatiangtatiang Posts: 11,842Member, Sous Chef, PRO, Senior Sous-Chef

    There isn't really a reason to delete attributes. If you don't use them in a particular scene, that's fine, but I wouldn't worry about it.

    To know why your actor doesn't move, I'd need to know what rules you're using in the actor instance.

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

Sign In or Register to comment.