Hello !
I would like to know if its possible to cancel movement or placement after the player accepts it.
For example until before the placement is completely over (all player placed), using the cancel command remove the prefab from the the grid one by one , allowing them to be placed elsewhere.
Also during a player's turn once the movement is finished (it costs 0 action points) and the action(the movement) consumed (but turn still active) if I cancel , bring the player back to the initial location to authorize him to move again while having the "move once" option active. I did a few tries but I can't get the desired effect so I wanted to know if it was at least possible.
I'll look into that.
As for canceling during an action - that's possible, but maybe a bit complex to set up.
You need to either handle this in the schematic animating the action (e.g. in the grid move schematic) or via a global machine that's started by the cancel input and cancels an action for a combatant.
Doing this in the schematic animating the action would e.g. use a Input Key node to check for the input and cancel out of the movement, placing the combatat at the starting cell again (you need to remember that at the start of the schematic and store it into selected data).
Via a global machine, you can use the Stop Battle Actions node to stop all or a combatant's actions.
In the schematic animating the action, enable Use End Slots in the Settings node - that'll add additional slots in the node that will be used when the schematic is stopped and at the end of the schematic. Here, you'll do the reset to the original cell via the Stop slot (again, store the initial cell in selected data at the start of the schematic).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
In my case its mostly to cancel the movement so I will try with the schematics for the gridmove ^^
Thanks for the guidance :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I tried several methods to reproduce the solution explained to make the schematics (without the global machine).
I tried to store my data with 2 nodes:
-"store combattant cell" and "select grid cells"
In both cases I tried to put the storage node just after the start of the schematics and just after "check grid path length" (but not at the same time) then at the end of the schematics (last node) a "set" node cell combattant " and a "store combattant cell" node this time configured in type load and using the selected data used in the storage node at the beginning.
This produces absolutely nothing so I'm attaching pictures of how I filled them in because it makes sense to build it this way but I guess I'm wrong.The point of this schematic is only to see if the combattant go back in his starting cell after the end of the move.
https://imgur.com/a/r6MEFVf
For the moment the only method that produces something but not the desired effect is when I use a "select grid cells" node and I configure "store cells" in "path" as on the image .
But the result is that my player moves backwards but off the map (outside the grid cells) + his real position on the grid is not modified. https://imgur.com/a/zwxTWpM
I admit that I do not understand why the selected data would not be stored or not used if stored, the methods explained have been used with several different names for the selected data and tested locally + global.
Your Select Grid Cells setup stores the path, but you want the original cell the combatant is on, i.e. either use a battle range template that just uses the origin cell or set up a custom range in the node.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
For the select grid cell I tried to use a custom range in a battle range template with 0 at minimum and maximum wich should give the origin cell.
Is that process correct?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
seems that the select grid cell with the custom range(mask) inside in the node is the easiest way ^^ I had to use a set grid path node too to set the new position of the highlighted cell at the end of the turn.I pretty sure its normal because seems logic to me but you didn't talk about so I rather give the info ^^
canceling placement is sooooo easy now too =) Thanks for this add ,its time saving ;)
Is this schematics seems optimized to you?Couldn't make it work with "input key" node(nothing happened even with 3 node of it at different point) or via the global machine because it triggered the reset at any time in the movement when I wanted it during the grid orientation selection.
https://imgur.com/a/GIaYAfo
You probably checked for the input key at a specific point, so if it wasn't pressed at e.g. the frame between finishing movement and selecting the next cell, it'll not go off.
You can e.g. use a Wait For Input node to wait for the duration of the movement instead of having the movement pause the schematic.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
yeah my bad x) There is the schematics : https://imgur.com/a/gu43oOb
If you disable waiting in the Change Position node and use a Wait For Input node afterward to wait for the time it would also allow canceling during movement :)
Otherwise looks ok.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!