Hello, I've been struggling to get the player to work in battles.
On battle start, the player doesn't move to the PlayerSpot and is unable to attack the enemy in turn based combat arena.
As I am using Game Kit Controllers character, I've set it up differently to better work with GKC and instead of setting the player in the settings it is done using an auto machine attached to the player.
On the player I add the Combatant and using an auto machine and run this schematic to set the player. I also make sure to disable the GKC camera/Controller when battle starts and enable ORKs top down camera.
In the BattleStart schematic settings Add Player Group is ticked, and I use the Place At Spots node to place but it doesn't seem to work.
Are you using any kind of use range in your battles? Also, is your player's game object the root of it's game object, or a child object?
E.g. if the moving player isn't the root, the position of the 'visible' player and the actual player are completely different and independent from each other, so range checks and placement don't work correctly. There's the Child As Root setting in the combatant's prefab settings for that, but I'm not 100% sure if this is used for your setup (not using a prefab). Make sure to have the machine setting the player (and game object) on the moving game object that is the visible player.
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!
No the player is not the root object, but as you mentioned I'm using the Child as Root settings. The machine sets whatever game object it is attatched to (which is the root player game object) as the player. I'll try moving it to the moving player game object.
I will have to double check but I don't believe we are using use range. Just checked, none of our abilities/attacks are using range.
Got it working by manually moving the player into the arena. So hopefully fixing the other issue should fix the player not being able to attack.
Sorry, I've spent hours playing around with it to try and get it to work and nothing seems to work. I can't seem to get the 'visible' player or the root game object to move.
Here is a hopefully a better description of how I am handling the player:
The Player game object is added to the combatant (Which is left empty) using the "Add Combatant" component. This component is placed on the root of the player game object.
At the start of the game, an auto machine attached to the player runs the "JoinActiveGroup" schematic.
This schematic adds the Player combatant to the group and sets it as the player using the 2 'set player' schematics (Set ORK Player/Set Player).
When battle begins, the "BattleStart" schematic is run
This schematic adds the player/combatants to Actor 1
The "GkcSwitchCamera" function is called which disables the GKC camera and enables the ORK topdown camera.
Finally all actors are moved into position using the 'Place At Spot' node.
Neither the 'visible' player or the root game object move.
I might need a Unity test project with your setup to test it out. You can reduce the project size by deleting the Library folder - zip it up, upload it somewhere (e.g. dropbox) and send me the link to contact@orkframework.com.
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!
Also, is your player's game object the root of it's game object, or a child object?
E.g. if the moving player isn't the root, the position of the 'visible' player and the actual player are completely different and independent from each other, so range checks and placement don't work correctly.
There's the Child As Root setting in the combatant's prefab settings for that, but I'm not 100% sure if this is used for your setup (not using a prefab). Make sure to have the machine setting the player (and game object) on the moving game object that is the visible player.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I will have to double check but I don't believe we are using use range.Just checked, none of our abilities/attacks are using range.Got it working by manually moving the player into the arena. So hopefully fixing the other issue should fix the player not being able to attack.
Here is a hopefully a better description of how I am handling the player:
I might need a Unity test project with your setup to test it out.
You can reduce the project size by deleting the Library folder - zip it up, upload it somewhere (e.g. dropbox) and send me the link to contact@orkframework.com.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!