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!
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 :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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:
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 :)
- first Change Variables node > change the operator to Add, otherwise you keep setting to the latest value instead of adding the values together :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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!
Also, for the change schematic, set everything to Ignore to make sure it's used for any change.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
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.)
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 :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I'll update the help texts in the next update, also provide them as both int and float variables.
Sorry about that.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Thank you so much for your time! It's really appreciated :)
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).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!