how to change a character on request

Hi, I am creating a shop. And I am make it so that when someone click buy it changes an attribute to a certain value. How can I make it so that when the chracter is enabled it changes the main actor to another

Comments

  • MattButlerStudiosMattButlerStudios Member Posts: 486

    So you are saying when they click to buy and the attribute changes, you also want the image to change? If so, just make a set of rules similar to these.

    When game.myAttribute = 1 | Change image to image1.png
    When game.myAttribute = 2 | Change image to image2.png
    When game.myAttribute = 3 | Change image to image3.png 
    

    and so on..

  • myu699myu699 Member Posts: 96

    i mean change the actor to a different actor

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

    If you really need to switch actors, spawn the new actor and then destroy the existing one. But usually, this sort of thing is achieved by changing the image as @MattButlerStudios‌ suggested. Other attributes can also be changed via rules once you've set a main attribute (e.g. game.myAttribute).

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

  • MattButlerStudiosMattButlerStudios Member Posts: 486

    It may also help for you to explain exactly what your particular need is so that we can address it directly.

Sign In or Register to comment.