I set morale in the game. The effect I wanted was for the player to gain morale by killing enemies, and for the player to lose morale by the death of a teammate.
You can use a Status value or a global variable. In the Player death animation, subtract from this status value / variable, and in the Enemy death animation add to it. Then you can check it in Formulas or other schematics as you need it
Using the death schematics is probably the easiest way to do this. If using a global variable or a status value is better depends on the use-case, e.g. what is the morale used for. One thing to consider, though, the status value is per-combatant, so morale would also be combatant-bound.
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!
I used a custom diagram for this grid event. The content of the diagram is that the combatant moves here and leaves the battle. After the combatant moves here, although the prefabricated body is removed, he still occupies the position of the battle grid. What node can remove the grid node occupied by the combatant?
The Set Grid Cell Combatant node can be used for 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!
I currently use it this way, when the combatant leaves the battle, I set his health to 0, and when the battle is over, I set his health to 1, which for now fixes my problem.
churan said: How do I set it? I used this node, but it didn't work.
What's your setup in the node? You need Set As set to Remove to remove the combatant from the cell.
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!
Is there only one solution?
So far I've set it up like this
If using a global variable or a status value is better depends on the use-case, e.g. what is the morale used for. One thing to consider, though, the status value is per-combatant, so morale would also be combatant-bound.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I used a custom diagram for this grid event. The content of the diagram is that the combatant moves here and leaves the battle. After the combatant moves here, although the prefabricated body is removed, he still occupies the position of the battle grid. What node can remove the grid node occupied by the combatant?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
You need Set As set to Remove to remove the combatant from the cell.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!