0 Favourites

How to add costumes?

  • Hello, Scirra Community, I need your help with transferring data to one layout to another. I cant figure it out...

    I have a shop on a Shop layout with different skins and masks, and if I buy one I want it to be attached to the player on the GAME layout. How is this possible?

  • I set this up but it doesnt work:

    on the shop layout:

    If Coins equal or bigger than 500 set SOLDOUT Visible

                                      set HAT opacity to 50

                                      system substract 500 from Coins

                                      Set Text to Total Coins: &Coins

                                      System toogle Boolean ON to true

                                      (the hats has a boolean for the system

                                      to check if true or false)

    on the game layout:

    If Hat boolean is ON    Set hat visible

                            Set position to Player.X, Player.Y

    But it doesnt work. Is there any flaw in my logic? I think this is the correct way of doing it but... I need help...

  • Set a global variable to the selected object in the shop layout,

    Then check the variable on start of game layout and have the player object spawn the corresponding object. pin it to the player and job done!

  • LittleStain, kudos, that worked perfectly. Thanks a lot :)

  • I would make 1 object called hats

    put all hats in different animation frames of the object and set animationspeed to 0.

    right click the event sheet and add global variable hats

    when hat one picked in store set the variable to 1, when hat two set to 2 etc..

    on start of game layout object hat set frame to global variable hats.

  • That seems even better. Thanks again :) Will try that.

    Now I have one problem with the pin behavior. When my player overlapses a gravity zone, the player changes angle to look like a fish, but with the pin behavior I cant make it look like its changes with the player in the animation, how can I make his work?

    It seems like I need to adjust set position and calculate it exactly

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Rope style seems to do it it better but then its a little off. Can I adjust the pin location?

  • I can't realy comment to this, for I can't see the effect.

    You can always unpin set position an repin if nescessary, but choosing the right way to pin (position and angle) and making sure your animation is consistent should be enough.

  • Done :)

    Thanks a lot LittleStain for your help. Without it I would still be on the shop section and now it rotates nicely using set position image point, the correct angle and pin position only. :)

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)