Hi again!

I have a little question concerning XP flying texts. My setup is that when you defeat an enemy, the character killing the enemy gets XP and a little flying text shows the gain.

However, when a character kills two enemies at the same time, it shows two flying texts.

Is it possible to show only one flying text that shows the sum of all XP gained from the defeated enemies?

Thank you!
  • No, each change is it's own 'event', creating flying texts and other changes.

    You might be able to do something with Change Schematics on your exp status value. E.g. collect the changes (they're passed on as local variables in the schematic, see the help texts in the change schematics settings) and displaying them with a short delay:
    - Change Variables node to add the change to an object variable on the combatant (Starting Object)
    - Wait node to wait for a short time, e.g. 0.5 seconds
    - Check Variables node to check if the object variable is still above 0
    - Show Flying Text node to display the value
    - Change Variables node to set the object variable to 0 (or remove it)

    This way, any changes happening within the timeframe will be added together and display a flying text for them.

    There might be a built-in feature coming for something like this in the future, but for now that's the way to go :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited July 2022
    Thanks for the reply, and sorry for the delay, I was out of town for a few days.

    I've tried what you suggested, but couldn't make it work. I tried to follow everything you wrote, but I obviously made a mistake somewhere. Here's what I did:

    image

    To the left, I've changed the settings in Status Value > Experience > Change Schematics, then I created and object variable for the combatants. To the right, I've shown my schematic and the setup of the important nodes.

    I've worked on this quite a bit today, but I can't figure out where I made a(several) mistake(s).

    Thank you :)
    Post edited by max_power on
  • At a first glance:
    - first Change Variables node > change the operator to Add, otherwise you keep setting to the latest value instead of adding the values together :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited July 2022
    Ok yeah, it makes sense! However, it didn't solve the issue.

    What setup should I have for Status Value > Experience > UI Settings > Flying Text Settings? Should I leave the settings like for my other status values? Or should I remove the flying text there since I show them in the other schematic? (I'm tweaking with that atm)

    If it's too complicated, it's ok, I don't want to take too much of your time with that issue!
    Post edited by max_power on
  • Well, when you display the flying text via the change schematic, you should disable the flying text in the status value, or you'll get multiple flying texts.

    Also, for the change schematic, set everything to Ignore to make sure it's used for any change.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • edited July 2022
    Ok, thanks for the reply. Now there's no XP showing at all. I've checked in the scene manager and it's not showing up either offscreen (in case I did something wrong with the placement).

    So either the variable is always stuck at 0 or there's something wrong with the Show Flying Text node.

    However, the character correctly gets the XP.

    (Btw, I've found a little mistake, in the Check Variable, it was set to check if it was greater than 1, and I changed it to equal or greater. However, it wasn't causing the issue there.)
    Post edited by max_power on
  • I'll do some tests.

    Btw, the UI nodes don't need to be in that schematic, they're used by the flying text's schematic - here, they don't have any access to the flying text :)
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Alright, found the issue - the status value changes (and old/new value information) are provided as Int variables, not Float.

    I'll update the help texts in the next update, also provide them as both int and float variables.

    Sorry about that.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Wrote a tutorial on this topic, you can check it out here.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Alright, found the issue - the status value changes (and old/new value information) are provided as Int variables, not Float.
    Ooooh! Wouldn't have thought of trying that! Yeah, changing float for Int did the trick! Thank you :)
    Btw, the UI nodes don't need to be in that schematic, they're used by the flying text's schematic - here, they don't have any access to the flying text :)
    Oh right lol. I think I copied those before playing with the Show Flying Text node. I started my schematic with the basic flying text schematic I had and never thought about those nodes later!
    Wrote a tutorial on this topic, you can check it out here.
    O.o Wow that's awesome!

    Thank you so much for your time! It's really appreciated :)
  • edited October 2022
    gamingislove said: Wrote a tutorial on this topic, you can check it out here.
    I did this tutorial for negative HP changes instead of Exp. Everything worked fine except that the combined flying text always shows a "-" minus operator in front of the value. I just can't seem to locate the source of it.
    Post edited by Scyra on
  • edited October 2022
    Probably because the value is negative.
    You can use the Absolute math function in the Show Flying Text node to make the displayed value positive (where you define the displayed value).
    Post edited by gamingislove on
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • That was very simple and it worked. Thank you.
Sign In or Register to comment.