Howdy, Stranger!

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

[Solved] Working with functions or something[email protected] Posts: 5Member
edited February 2015 in Community Tutorials

Hello guys, I'm new on GS and I have a bunch of actors using the same code in my project. So, if I need to change something, I must change each actor one by one. So, do we have a function or something in GS that I can use?



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

    You can copy actors by option/alt-dragging them in the Inspector/Library (not sure if you're on Mac or PC). You can also copy and paste rules and behaviors.

    After the fact, you would need to change them one by one if they are separate actors. If you use a single "prototype" actor, though, then you just change the rules for that actor once and every actor on the scene automatically updates. Can you explain what it is you're changing?

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

  • I'm using mac. I making a simple game to my daughter. she has 1 year old. It consist in drag some figures and drop inside a chest. I have 5 actors, one ball, one dice, one tree, one train and one doll. The system randomly ask her to drag some of those actors. If she get the right actor, it is destroyed and scored. If she fails, it simple come back to start position. Each actor has the same program. If I need to change anything in dice for example, I need to copy and paste this change in every actor. I want to create a bunch of actors in future(100 more or less), so I think it will be more easy if I have some functions, so I don't need to change each actor everytime I realize some ideas.

  • gyroscopegyroscope I am here.Posts: 6,577Member, Sous Chef, PRO
    edited February 2015

    Hi @[email protected].com you can utilise the "power" go Prototype actors when it comes to Rules by placing your generic rules in the Prototype actor's rules. then by dragging them onto the scene, they can be unlocked to customise them if needed.

    If not, by changing the rules of any one prototype will automatically change all the others, providing the actors haven't been unlocked.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain

  • got it!!! Thanks a lot guys.

Sign In or Register to comment.