I was asking questions on another thread as well, but I have more questions.
When the New Year holiday comes, I try to advance various developments, so I inevitably have many questions.
Thank you in advance for your cooperation.
1)
I'm trying to add mecanim animations to the player, allied combatants, and enemy combatants.
For normal attacks I'm sending parameters using the Attack node in the schematics.
However I don't know how to send parameters for other actions such as "damage", "use", "cast spells", etc.
I imagine there are schematics for these as well,
but where are the settings for them?
2)
In order to affect other scripts during battle, I am trying to change variables with the Change Variable node in the BattleStart schematics.
I am trying to manipulate an int type variable with a global variable, but it is not working.
I have the variable value displayed on the screen at all times,
but it does not change from its initial value even when battle begins.
Why does the variable not change with Change Variable?
2) Do you see it change ever at other times? Try looking in inspector at the variable. If how/where you're displaying it does not have access to it, it will display as default, probably 0, or blank. It's possible that what you're using to display it isn't actually accessing the variable. You could also add a Unity Console node and display the variable there, perhaps before and after the Change node.
Are you using more than one Battle Start schematic? Are the schematics assigned manually to a battle? ie could it be using a different schematic that doesn't have the Change Variable node?
I am not using any other battle start schematics.
However, I used Variable Fork to check if the variables had changed, and they had.
It seems there is a problem with the script that reads the variables.
I will check that script.
Thank you very much.
https://forum.orkframework.com/discussion/7231/ork-game-variables#latest
If you're doing a 3D game, check the 3D Action RPG animation setup, or for 2D the 2D Quickstart RPG animation setup.
Generally, the setup in ORK depends on your animator controller's setup, e.g. based on if you're using transitions (based on parameters) or play the animations directly.
If find it easier to play directly and have an exit time in your animations - i.e. you just play the attack animation and it transitions back to your idle/starting animation when it's done. No parameters needed to set here.
Overall, you'd just set up your animation types (Base/Control > Animation Types), hook up animations (Base/Control > Animations) and use that animation setup in your combatant's settings.
Playing the animations is done using the Combatant Animation node in your schematics, playing them by the animation type.
2) Might just be a display issue - where and how are you displaying the variable?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I have already read the Mecanim animation tutorial.
Things have progressed to a certain extent since yesterday.
I am trying to perform an attack action with Combatant Animation in the Attack schematics.
The cause seems to be that the bool value item is not checked when sending parameters with bool.
(Strangely enough, walking animation works even without checking bool value)
Also, since it did not work with Combatant Animation at first,
I switched to "Play Mecanim Animation" halfway through, which was also one of the reasons.
When I set it to Machine Object with this node, there was no reaction at all.
Things are going fairly well now.
However, the animation during attack behaves a little strangely.
When moving forward and backward during an attack, the player character floats in the air, and the enemy twitches just before the attack animation.
It also repeats its attack motion repeatedly.
It probably does not work well when executing move forward and move back during an attack.
I don't think this behavior is related to mecanim.
Could you please give me some advice on this?
Thank you for your continued support.
Also, in case you're using ORK's auto animation feature (set up in combatants), I'd recommend to not use it with Mecanim, that's mainly used for legacy animations. Mecanim should handle this via blend trees and forwarding the move speed as shown in the tutorials.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!