I'd like to start a grid battle, using multiple player and enemy (and possibly ally) combatants who are already in a scene, which will start normally but auto-select and move all of the combatants within a certain range to their closest approximate free cell, without destroying and respawning any of them, and also using the movement animation rather than just instantly blinking them onto a random cell. My thought is to place enemies strategically and keep them near the middle of a grid, and to make grids large enough as to ensure plenty of space for player combatants to find a nearby starting cell. If any player combatants are outside of the immediate battle range, I'd like to check their distance from the grid's edge and spawn them in after a determinate amount of time. Will that be possible?
Use a Set Grid Cell Combatant to select a cell for the combatnats, enabling Use Nearest Cell (and disabling Place At Cell) would use the nearest free cell (that's not blocked). Now you have a cell assigned to your combatants.
Next, set up a game event that moves the combatant to its cell and set it up as a custom event for your combatants. Either in Battle System > Battle Settings in the Default Events or in your individual combatants. Use a Custom Combatant Event node in your battle start event to use the evemt, which will proceed to move the combatants to their cells.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Yeah, they're already assigned to the cell via the Set Grid Cell Combatant node. You could either store the cell's position as you suggest, or use a Store Grid Cells node to store the combatant's cell into found/global objects and use that to move to.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
-That's excellent news! Theoretically, then, I could use a single grid to cover an entire scene. Making large grids in the editor had me afraid that it would break my game. Is the editor lag mostly due to an excessive GPU load?
"Yeah, they're already assigned to the cell via the Set Grid Cell Combatant node. You could either store the cell's position as you suggest, or use a Store Grid Cells node to store the combatant's cell into found/global objects and use that to move to."
-How do I access that information in the custom combatant event? I'm keeping things simple to begin with, using a battle start event that opens into three 'Set Grid Cell Combatant' nodes for the player, enemy and ally groups and then running the custom events for each. If I use a 'Store Grid Cells' node for each of these player groups, I suppose that I'd first of all need to use three separate custom events for each group to find the appropriate tag, but will the individual combatants be able to find their own cell that way? Also, should I store the cells as a 'Path', 'Battle Range Template' or 'Custom', and should I check the box for 'Separate User'?
The custom events run on each individual combatant, i.e. you can use a Store Grid Cells node (e.g. with a battle range that just uses the origin cell) to get the combatant's cell.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
-Those scene handles are loaded into the scene during game play as well, though, right?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
-Can we display/activate only part of a grid upon starting battles?
-Is there a method to link the cells together by their points so they can retain a solid pattern on slopes and the like--sort of like how the UI can be setup to adjust itself to any screen size?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!