Damage numbers

This forum is currently in read-only mode.
From the Asset Store
This sound pack features 117 game sounds : Axe,Punch Swing & Hit & Damage. This is a perfect collection for your game.
  • I tried using the text object for damage numbers but when I hit more than multiple monsters the text becomes absolutely black.

    I also used SpriteFont plugin but it's bugged as creating more spritefont objects will spawn in higher positions than wanted and also theirs no action to set opacity

    Are there any examples that can use sprite text and can fade away as well and the best way so that the games won't lag.

    Thanks

  • anyone?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hmm, that's a tricky one. You may want to make a custom numbering system out of sprites (0 to 9).

  • i know but how to make it work?

  • i cant figure out how to put them together, i tried using hashtable and other plugins.

  • Maybe this older blog article can help:

    Bitmap font damage

  • I had the same problem with hitting multiple enemies, except I got some different bugs, but I think this solution should help.

    What I did was make it so that when you hit an enemy, for each enemy, a variable "hit" changes to 1 and then a function "damaged" is called.

    On the function "damaged" you would select the enemy that has "hit" equal to 1 and then spawn your damage numbers and whatever other effects that you need to apply.

    When you finish spawning the numbers, you set "hit" to zero and then you're good to go.

    So basically, as your weapon hits each enemy, even if it hits multiple ones, it should go through each enemy, one by one, and then spawn the number and then move on to the next without duplicating the numbers.

    Hope this helps

  • Hey,

    There is an awesome little piece of software I believe somebody created on this forum called something similar to "GiveYourFontsMono", you can use that to generate a Spritefont for you. Using the options within the software, you can leave space around the edges of the SpriteFont, and then you could draw an outline around them (so white font, black outline). Some software does this for you

    The other way, you could program it in which gets a bit fiddly to explain. You would have a Sprite called "Digit", in which each frame is the image for the number (Frame 0 = 0, Frame 1 = 1, all the way to 9), and you could slap the Bullet and Fade behaviour onto it so it moves and fades away, then you just gotta do a slightly complicated few events in order to position the numbers correctly according to the damage (This is really finicky to do, I totally recommend Spritefont).

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