Hi Gil,
The Subject is Summoning Combatant in Battle Grid.
I would like my buildings to function as a barracks where I can recruit fighters for a gold cost during grid battle.
My battles take place on a hexagonal grid.
I feel like I'm missing something simple, but I spent Sunday afternoon trying to create this skill.
What I got was to make the Combatant spawn in the Player position, but it doesn't join the battle when I add this node.
By adding this node (Join the Battle), another combatant is added, in a random position next to the "Combatant" that summoned him, without respecting the battle grid. Also, this second combatant is left as if his starting position in the battle grid was in the first grid cell. So, on your turn, what we see is this combatant running to that starting position and only then following the selected path.
As I said, I must be missing something simple here. Can you help me please? Ideally, the Combatant would be spawned within the skill range template.
I'd try the following:
- Join Battle node to have a new combatant join the battle (in the User's group)
- Select Combatant node, selecting all Battle combatants from the user
- Select Selected Data node to get the Last combatant from the selected data
That should now have the newly joined combatant stored as your selected data and you can use it to place it.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I feel that we are almost reaching this stage. With your help we are now able to spawn only one Combatant.
The problem of the position / location where it is generated still remains.
The Combatant continues to spawn in a random position around the player. And for movement, keep going to the first cell.
Thinking about it, is there a way to create an ability that modifies the cell type (to a summon type), so that the Combatant is Spawned exactly on that cell?
Thanks in advance GiL!
Cell types can't be changed in-game - at least not out of the box.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Here it is. I just wanted the Combatant to stay on the grid location that was summoned with the skill (on some cell around the Summoner). But it still continues to appear next to the summoner, but without respecting the position on the grid. And when he selects his movimaneot he walks to the first cell and then starts the selected path, as he had said. I really need help.
Here is the link with the print of the event.
https://drive.google.com/file/d/15JgfJi9mbnXfF2sR1UyllvTu5STnKtOa/view?usp=sharing
Thanks!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Currently, you first set the cell to be occupied by some combatant, afterward join a new combatant.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Very grateful for all the help. I followed your guidance and to our delight we are evolving.
By that I mean that we solved the problem when we selected the movement of the Combatant generated and he walked to the first cell of the grid.
It is now starting the movement of the selected location to be spawned.
The Problem that remains is that of where the Combatant is spawned. I noticed that it still doesn't respect the grid, and I also noticed something that might be relevant... The generated Combatant is always being generated on the summoner's back... always the opposite direction of the summoner's orientation.
I spent the morning trying to advance this and without much success so far...
I confess that I'm struggling a little to understand the logic behind the Selected Data... Maybe this information will help.
My English isn't that good... but I'm still determined.
I need help please.
I shared a screenshot of the Event with you.
Select Combatant node
- selected key: don't forget to define a key here, your Select Selected Data node uses a key, but the combatant's aren't stored in the same key
- use all combatants: enable
- combatant scope: Battle
- combatant origin: Combatant
- object: Actor
- actor: User
Set Grid Cell Combatant node
You need to use the combatant stored in selected data from the Select Selected Data node:
- object: Selected Data
- selected key: the same key you stored the last combatant in
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Always grateful for your patience and dedication.
I followed your guidance as far as I could understand. I can't understand what's wrong.
Select Combatant node
- selected key: don't forget to set a key here, your Select Selected Data node uses a key but combatants are not stored in the same key (Summoned)
- use all combatants: enable (OK)
- combatant scope: Battle (OK)
- origin of combatant: Combatant (OK)
- object: Actor (OK)
- actor: User (OK)
Set Grid Cell Node Combatant
You need to use the combatant stored in selected data from the Select Selected Data node
: - object: Selected data (OK)
- selected key: the same key you stored the last combatant in (OK? Summoned)
Is it like the "Place at Cell" Field of the "Set Grid Cell Combatant Node" is not working properly?
Or must I have filled in some field wrong in some node that contains "Selected Data"?
I shared the prints with the 04 of the Event's nodes.
Grato desde já,
So, the combatant is already set for that cell, all that needs to be taken care of is placing it there.
So, after the Select Selected Data node simply use a Change Position node instead of Set Grid Cell Combatant node:
- object: use the Selected Data with the key you used (Summoned)
- target position: enable To Object and select the Target actor (which is the selected cell from the cell target selection)
In case it's not working like that, add a Wait node before the Change Position node with a 0 second wait to give Unity time to spawn (but should work without, at least in my test).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If it's not used, the combatant should be placed on it's cell, otherwise it'll spawn around it's leader and use the battle event from Join Battle Animation (e.g. to move to the position).
The default settings for this are in Battle System > Battle Settings > Combatant Settings > Battle Animations.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I Will check my Battle Animations.
Grateful,