Prototype actor issue

I've been using gamesalad for a few months now and luv it!

I have a problem though. I spawn an actor onto the screen. I then want to spawn another actor off the same prototype but with a changed image. I can do that but how do I stop the first instance actor I spawned from changing its image. Any ideas?

Thanks

James

Comments

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

    Make a text game attribute called game.nextImage. Use these behaviors in the spawner actor:

    Change Attribute game.nextImage to "imageName"
    Spawn Actor [actor name]

    In the spawned/prototype actor:

    Change Attribute self.Image to game.nextImage

    You can also do something in the spawner actor such as Change Attribute game.nextImage to "imageName"..game.imageNumber and increase game.imageNumber by 1 each time before you spawn. That would allow you to have image files named imageName1.png, imageName2.png, imageName3.png, etc.

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

  • JayceeJaycee Member Posts: 2

    Thanks I kind of get it. I want the spawned actor to leave an image of itself on the screen and then stop being an actor.

Sign In or Register to comment.