SpriteFont (v0.99.5RC) - new update, small bugfixes

This forum is currently in read-only mode.
From the Asset Store
Fantasy Game includes more than 600 sound effects inspired by hit computer games like World of Warcraft and Diablo.
  • wow...

    destroy

    who woulda thunk it?

    I'll get that in there by tomorrow night

    thanks again

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • No worries!

    And thanks!

  • ty for this. will you continue to update this with newer versions

  • manontherun, no prob

    and I'll continue for as long as I need

    to be honest though...I'd like to finish it eventually

    btw, changelog:

    fixed stuff

    added destroy, and other useful stuff

    http://dl.getdropbox.com/u/1013446/SpriteFont.rar

  • Hate to point out even more stuff, but I found some issues...

    CAP: http://www.konjak.org/spritefont.cap

    When executing a "destroy"-command the object doesn't actually destroy until I create a new one of the same object. Left click is to create a text, right click to destroy. May be notable that the original SpriteFont has "Destroy on Start" ticked.

    Making this example I also noticed that if I create multiple SpriteFonts out of the same one and the old ones aren't told to somehow always "show text" (as in if they are only told upon creation to show text) the old one will have its text disappear.

    Still a kickin' plugin though, I just still can't destroy them right!

  • ok

    fixed, redownload from the same link

    thanks again

    I forgot that the letters are separate objects and need to be destroyed, too

    you'll notice however, that if you don't rearrange the events so the right click event is after the ShowText event, it'll still seem like it's still not working

    this isn't the spritefont plugin though

    this is because the way construct works, objects aren't really destroyed until the end of an event sheet,

    look at the following cap, to demonstrate:

    http://dl.getdropbox.com/u/1013446/seewhat.cap

    the purple sprite is destroyed immediately

    the red dot is destroyed on startup,

    so the one on screen is made by the purple sprite after the purple sprite is destroyed

    the text is set by a private variable of the purple sprite after the purple sprite is destroyed

    weird, I know, but it's a known issue, and it's not going to change until construct 2 I believe ashley said

  • I'm not sure how that relates to the text of SpriteFonts never disappearing, because I still can't destroy text properly, since your point is it will still destroy before the next screen refresh, and it doesn't.

  • you'll notice however, that if you don't rearrange the events so the right click event is after the ShowText event, it'll still seem like it's still not working

    if you show text in the same event sheet, after you destroy them, they'll still put the text to screen that one last time

    then be destroyed, and unable to erase it

    arrange events so they don't put text to screen after you destroy

    you can do this :

    always, put text to screen

    on right click destroy

    and it'll work

    if you do

    on right click destroy

    always put text to screen

    like I said it's not just fontsprite object

    if you take a normal sprite and do:

    on right click destroy sprite

    sprite:spawn sprite2

    they will still spawn a sprite after they are destroyed on that last go through the event sheet

  • Is destroying it that good of an idea? After all you can change the text any time you want, and you can change the sprites visibility likewise. I just always figured it was meant to be a static object.

    Besides that don't you have to reset everything after its destroyed?

  • you could just have a function to create and set all the options

    and yeah, personally I would usually use it as a static object

    but I can see it used in other ways as well,

    like he said, he wants it to be words balloons, much easier as separate things

  • Ah, of course, can't quite get into the "each letter's a sprite"-mode.

    And yeah, I'd much rather destroy balloons instead of making a system keeping track of which ones to use and keep like a couple around and pick ones that aren't currently in use, etc.

  • Creating multiple of the same SpriteFont and they aren't Always set to a text still makes old ones stop showing text.

    Side note, would Always showing a text be very processing-heavy when put in a game, considering it constantly creates and destroys 100+ sprites?

  • Creating multiple of the same SpriteFont and they aren't Always set to a text still makes old ones stop showing text.

    what was that now?

    like multiple instance of one spritefont object

    and if the second one shows text, the first one stops showing text?

    or one spritefont, and you tell it to showtext twice?

    if it's the second one, yeah, it's like textbox, if you tell it to show something, it stops showing the last thing

    [quote:398b18el]

    Side note, would Always showing a text be very processing-heavy when put in a game, considering it constantly creates and destroys 100+ sprites?

    no, shouldn't be bad

    that's how scrolling works

    also there's a trick if you ever start making long story scenes and you do get slow down

    make a canvas

    attach the spritefont to the canvas (there's an action to attach to an object)

    Write Text(not show text) - absolute (not insert)

    then

    On Any Letter Written

    Paste To Canvas

    Destroy Sprite

    On Last Letter Written - Clear Text

    this would paste each letter one at a time on a canvas and then get rid of it

    so there would never be more than one letter on screen at a time

    you clear the text when you're done, so you don't accidentally try to make fontsprite access those sprites after you destroy them. I think I made it double check in most cases

    but of course, trying to do something to a destroyed sprite would crash the game

    this would get your whole paragraphic

  • What did you mean by:

    "no, shouldn't be bad

    that's how scrolling works"?

  • what was that now?

    like multiple instance of one spritefont object

    and if the second one shows text, the first one stops showing text?

    This one's the problem.

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