0 Favourites

Sprite coin counter

  • I've made it to where I can have it say how many coins I've collected on the top left no problem. I've read that tutorial. I was wondering if there is a way to have an image instead of the word like:

    (sprite of coin image): 07

    Any help is much appreciated

  • just put a sprite there, where the coin should be, and put the text beside it.

    If you want bitmap fonts

    scirra.com/forum/plugin-spritefont-31th-july-2012_topic45876.html

  • Thanks man, I'll look into it here in just a minute!

    While I have your attention I would like to ask another question (I've seen you answer many questions on forums).

    I have no idea how create a life bar that is of hearts and how to implement it with damage taken or health gained. Can you help with that?

    Thanks for answering my original question

  • No problem!

    So you want something like Zelda?

    The kind with just 3 hearts and you remove one for every hit?

    I'd suggest you use a Tiled Background Sprite with one heart sprite within it, stretch it to 3 hearts.

    When you get hit, set the event to set it's width to itself with .ImageWidth and minus off eg. 20px from it?

    So Life.ImageWidth - X (X being the width of each Heart sprite)

    If you want to regain one, simply add it back.

    Also, you should set a limit by checking if imageWidth is already maxed or 0.

    Hope this helps!

  • Thanks a lot. Both tips worked like a charm.

    Your answers are so clear and concise compared to most I get (not that I'm not thankful for them).

    If it's not too much trouble I would like another question since you answer my questions so clearly.

    I have falling platforms (they fall when you stand on them no problem there), but once I am on it I cannot "jump" off of them. I have to walk off. Any idea of what I should do?

    Here is the capx.

    dropbox.com/s/ryom0vrmfg6ry9f/Jungle%20Tutorial%20%28Hulk%29.capx

  • That's a tough one..

    The problem is as the platform falls, the player is not moving with the platform, its falling slower and bouncing on it. Most of the time, leaving it in the air.

    Other people suggest you add a double jump to the player, and you enable double jump when you are on the platform, but disable it once you are off it.

    scirra.com/forum/jumping-from-falling-objects_topic52019.html

  • Yeah, I saw this post, but I was trying to do it without a double jump. Is there a way I can have the double jump active when I am on the falling platforms, but then inactive when I'm not?

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • I would do a distance() check, checking if your Y distance is within an acceptable range and you X distance is within the platform's width. This should almost always get you a double only when you are falling from the platform.

    Use the pick nearest object to choose your platform to check distance with.

    To minimize the distance range acceptable needed, remove the elasticity from the platform. I checked your capx, it'a factor making your player object bounce on it.

  • Hey Rory, I still haven't tried this yet. I've been caught in up in a lot of things, but I will try soon and let you know. Thanks for all your help by the way. My friend and I liked your game.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
0 Favourites
Sprite Font Generator - v3
368 112,274
RetroDaddy's avatar
RetroDaddy
Unread hot topic
86 28,702
St4rDu57's avatar
St4rDu57
Unread hot topic
153 104,428
DravenX's avatar
DravenX