To plan some enemies, I have a questions saving combatant data. Is possible to save combatant information of the combatants that were created using script but not spawned? And their group information?
Hmm.. So, if I got this right I can save those groups by saving DataObject I get from Group.SaveGame() as data in Custom Save Data ? So, something like CustomData.Set("Group", Group.SaveData()
and then doing same but loading this data into group with load? + LoadMembers ?
Pretty much, yes - loading would go something like this: DataObject data = CustomData.GetFile("Group"); Group group = new Group(data); group.LoadMembers(data, true);
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!
Will probably be in the next update if I'm able to sort out all the issues. Generally, creating the rotated grid is easy, it's just that a lot of other grid functionality doesn't take that into account ... Send me an email in case you want to test a beta version of it :)
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, thank you! The global rotation offset would be immensely helpful. Hmm, other functionality probably the movement, positioning etc. of the grid ? Maybe global offset could simplify that? I can see how it can be massive issue if each grid would have it's own rotation. I will email and would be happy to test the beta.
Hey, Is this a valid use scenario? 1) Event#1 - A game event with event actor and a node that starts the battle on this event actor. 2) Global Event with Event#1 assigned as its event. 3) Event#2 - A game event that calls upon Global Event using shared variables/found object etc.
The result would be some functionality transferred into the global event and target objects fed to it from triggering event.
It did not work for me, so I just wanted to confirm if it is supposed to work like this?
No, because the global event doesn't have an event object actor. But since you can forward selected data and found objects, you can pass on a game object like 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!
Is there a way to grab a grid cells from combatant in battle event? For example, I want to place certain combatant on a cell, but if that cell is occupied by another combatant I want to swap the combatants.
Also, if you want to swap combatants that are both already on the grid, you can use a Swap Grid Cell Combatants node to swap them (works with both combatants and/or cells as objects). There's also the Is Grid Cell Empty node to check if a cell is empty or occupied :)
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!
Pretty much all nodes that require a certain thing (e.g. a combatant or a cell) will try to find that on the used game object - e.g. if a cell is needed and you use the game object of a combatant, it'll use the combatant's 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!
I have #1)Spawned a Combatant A into a new Allies Group #2)Selected that combatant into selected data #3)Spawned a new Combatant B into a group of a Combatant A from step #1.
Combatant A is moved instead. And the same thing happens for 3 more combatants spawned using the same way.
But if I leave everything as it is, but only change Step #3 Combatant B to spawn into new faction then everything works correctly and Combatant B is moved using grid swap.
My guess is I'm missing some obvious setting where It says one of the operations works on the group leader instead of individual combatant, but I have not spotted it yet :(.
Your issue is using the Battle combatant scope in status requirement - this basically is valid for all combatants who are in a group where that combatant is part of the battle group. Using the Current scope will only check the combatant that's checked.
Also, the Battle scope in the combatant settings of the Select Combatant node would be better set to Current, as you already use the All Combatant actor, which includes all combatants. In this case, it'd check each combatant and their battle group, performing the checks multiple times :)
One thing, though, it might be needed to add a Wait node after Join Battle, e.g. with 0 second wait to continue in the next frame. I'm not 100% sure if the combatant new combatant is already available otherwise, since this requires the combatant's prefab to be spawned and Unity might take until the next frame to do 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!
Is possible to save combatant information of the combatants that were created using script but not spawned? And their group information?
So, something like
CustomData.Set("Group", Group.SaveData()
and then doing same but loading this data into group with load? + LoadMembers ?
DataObject data = CustomData.GetFile("Group");
Group group = new Group(data);
group.LoadMembers(data, true);
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Is there a way to rotate the whole grid (Before generating grid, so generated grid is rotated) ? Or any plans to add support for it?
Will probably be in the next update if I'm able to sort out all the issues. Generally, creating the rotated grid is easy, it's just that a lot of other grid functionality doesn't take that into account ...
Send me an email in case you want to test a beta version of it :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Hmm, other functionality probably the movement, positioning etc. of the grid ? Maybe global offset could simplify that? I can see how it can be massive issue if each grid would have it's own rotation.
I will email and would be happy to test the beta.
1) Event#1 - A game event with event actor and a node that starts the battle on this event actor.
2) Global Event with Event#1 assigned as its event.
3) Event#2 - A game event that calls upon Global Event using shared variables/found object etc.
The result would be some functionality transferred into the global event and target objects fed to it from triggering event.
It did not work for me, so I just wanted to confirm if it is supposed to work like this?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Also, if you want to swap combatants that are both already on the grid, you can use a Swap Grid Cell Combatants node to swap them (works with both combatants and/or cells as objects). There's also the Is Grid Cell Empty node to check if a cell is empty or occupied :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
So, if I understood this correctly by doing this:
https://i.imgur.com/GN4B4D9.png
I have
#1)Spawned a Combatant A into a new Allies Group
#2)Selected that combatant into selected data
#3)Spawned a new Combatant B into a group of a Combatant A from step #1.
But then if I try to select Combatant B from step #3 with this node:
https://i.imgur.com/KEgWQem.png
And grid swap it using this node:
https://i.imgur.com/OHvNvjt.png
Combatant A is moved instead. And the same thing happens for 3 more combatants spawned using the same way.
But if I leave everything as it is, but only change Step #3 Combatant B to spawn into new faction then everything works correctly and Combatant B is moved using grid swap.
My guess is I'm missing some obvious setting where It says one of the operations works on the group leader instead of individual combatant, but I have not spotted it yet :(.
Also, the Battle scope in the combatant settings of the Select Combatant node would be better set to Current, as you already use the All Combatant actor, which includes all combatants. In this case, it'd check each combatant and their battle group, performing the checks multiple times :)
One thing, though, it might be needed to add a Wait node after Join Battle, e.g. with 0 second wait to continue in the next frame. I'm not 100% sure if the combatant new combatant is already available otherwise, since this requires the combatant's prefab to be spawned and Unity might take until the next frame to do that.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!