Sorry if this is a very obvious question, but I just cannot seem to find the answer.
In Battle Settings, I disable use target menu and just use mouse/touch control with mouse button = 0 and click count = 1. I know ORK is using a raycast to find the enemy combatant, but it doesn't seem to be working for me in 2d. I have a box collider 2d attached to the enemy combatant with "is trigger" checked. Not sure what else I can do besides that. Can someone explain to me how to make it work in 2d? Is it the 2d box collider?
Also a not exactly related question: I'm interested in playing an animation for player combatants when it's their turn in turn-based battles. ie when the ability menu pops up for a certain player combatant, I want that combatant to transition to a "wait idle" animation state while waiting for input from player before attacking. I see that there's a "Action Wait Idle Type" in Battle Animation Types, and I think that's what I'm looking for, except nothing happens when I assigned the death animation to it. Please can someone tell me what obvious step I missed?
Check the Raycast Settings in Game > Game Settings if they're raycasting for 2D objects. I think the default is only 3D, you can change that to use only 2D or a combination of 2D and 3D.
The Action Wait Idle animation is played when you've selected an action for a combatant and he's waiting to perform it (e.g. when using classic turn based where you select all actions at the start of the turn). I don't think it's currently possible to play an animation while choosing.
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!
Awesome thanks, I didn't know raycast settings was included in game settings. It's been a while since I used ORK.
Can you point me to the code that handles turn calculation? I want to see if I can add that feature through scripting and post it here if I can get it to work.
Never mind, I went through the API and managed to find a solution using the Combatant and ActiveBattleMenu classes. Please let me know if there's a more elegant approach.
Attach this script to each player-controlled combatant: if(combatant.BattleMenu.IsOpen) animator.SetBool("wait", true); else animator.SetBool("wait", false); I also included a check to see whether it's a battle scene or not. I'm not sure if it's necessary, though.
The Action Wait Idle animation is played when you've selected an action for a combatant and he's waiting to perform it (e.g. when using classic turn based where you select all actions at the start of the turn).
I don't think it's currently possible to play an animation while choosing.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Can you point me to the code that handles turn calculation? I want to see if I can add that feature through scripting and post it here if I can get it to work.
Attach this script to each player-controlled combatant:
if(combatant.BattleMenu.IsOpen)
animator.SetBool("wait", true);
else
animator.SetBool("wait", false);
I also included a check to see whether it's a battle scene or not. I'm not sure if it's necessary, though.
Thanks again for the help!