How I can use 1 sprites multiple times in 1 layout?

0 favourites
  • 4 posts
From the Asset Store
An educational game for Times Table. An easy to use template for developers to build larger games
  • I'm a newbie

    When player finish a level, it will get Stars Point. I want to replace the blankstar sprites with star sprites, how it can be done?

    Thanks Before

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Be sure to know the difference between object type and instances.

    The Sprite object is at use and provide animations features.

    In the screenshot you provide, on the left there are three frames (one with one star filled, one with two stars filled, and the last one with three stars filled).

    On the right, you have a frame with no stars filled, on top of which has been added a number.

    So you could have a single sprite, with a single animation using the four different frames (the numbers would be another sprite or could be a Text object).

    A single object type, multiple instances.

    Set the animation speed to 0 (so it will only be like a "bank image" not an animation browsing through the frames).

    In the event sheet you can use the Sprite action Set animation frame.

    And you set it to the number of stars you want to be displayed.

    If you already have a project in progress, post it, it will be easier to answer your question in regards to what you have already done.

  • Hi,

    I'm planning to do a video that uses that in the near future, but it's not finished yet.

    What I can tell you is to take a look at one of my other tutorials here:

    youtu.be/rDKwhBwf7Ck

    on a logo quiz, where I do something similar: set an animation frame depending on a condition, It's not stars, but it's letters. The boxes where you can drag the letters to depend on the correct answers, where in your example the stars depend on the user scope. Somewhat similar actually.

    Hope that helps!

  • Thank You so much for all answers supports, i'll try ASAP then i'll share the project here

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