Hello!

I'm currently using the turn based grid battle system and I'm trying to create a ability that functions like a grenade. I use the ability in turn x and it will detonate on the selected grid cells after a selected number of turns.

I didn't find a way to make this happen in the base template so I looked into the schematics but couldn't quite figure out how to do it. Actions like wait calculate in real time and I dont think actions like check battle turn are quite what I want either.

Any help would be appreciated!
  • edited November 2023
    There are cell events available to do something like this. E.g. add a temporary cell event to the cell via the Add Temporary Cell Event node.

    The event itself can just do nothing, e.g. using event type Schematic and not using a schematic (and also start type None).
    What you want to use are the Remove After settings, e.g. remove after X turns and use the Remove Schematic for your explosion damage.

    The remove schematic will have the cell available as Machine Object, i.e. you can get the combatants on cells around it using a Select Grid Cells node and e.g. do damage to their stats.
    Post edited by gamingislove on
    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!
  • edited November 2023
    Thanks for responding!

    I tried to set it up as suggested but I guess I'm doing something wrong since my enemies never end up taking the damage.

    So this is the first schematic where I select the grid cells and then add a temporary event.

    Grenade-Schematic-1
    Grenade-Schematic-2

    Then in the second schematic I select the grid cells and use a change status value event.
    Grenade-Schematic-3
    Grenade-Schematic-4

    Everything does fire but I'm not familiar enough with ORK to know if I'm not selecting the cells/enemy correctly or if I'm not applying the damage.
    Post edited by Sebastian on
  • edited November 2023
    The Change Status Value node should use the cells you stored, i.e. object Selected Data, Local data origin and data key cell.
    Also, Select Grid Cells can directly get the combatants from the cells if you enable Store Combatants. The Change Status Node should be able to change stats on combatants on cells, though.
    Post edited by gamingislove on
    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!
  • edited November 2023
    So I set the Change Status Value node to use selected data and the Select Grid Cells node now has get combatants from cells stored.
    But I'm guessing something is going wrong with the selected/stored cells because the damage is now originating from the player instead of the selected cells.

    Added a picture of the updated Change Status Value node for good measure.
    Grenade-Schematic-5
    Post edited by Sebastian on
  • Are you sure you place the cell events on the correct cells?
    Based on your screenshots, you get the cells there based on the Machine Object, i.e. the user of the ability. If it should use the target (or targeted cell for cell targeting), you need to use the Starting Object.
    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!
  • edited November 2023
    Ahh that worked right away, thanks so much!
    There are still some bugs with the damage (I think its doing damage multiple times per enemy?) but ill figure those out.
    Post edited by Sebastian on
  • Might be, since you use the same battle range template for placing events and the damage schematic.
    That would lead to the granade event being placed on all cells, and also use the cells around them when exploding. So, either limit the placement of the event to the targeted cell (i.e. Starting Object in the ability's schematic) or have the damage schematic only use the cell of the event (Machine Object of that schematic).
    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!
  • edited November 2023
    Sorry to bump this but I didn't see a reason to start a whole new post since I also got to the same conclusion as the end of this post.

    After alot of experimenting what seems to be happening for me is that the remove schematic doesn't just use the schematic, it seems to only use it in the same way a cell event does so unless there is an enemy on top of the exact cell then no one takes damage in the blast radius.

    Example: put starting cell into data and then put the temporary schematic cell event onto that cell with a remove of 2 turns.

    the remove schematic just uses select grid cells to get the cells around the cell event cell with a battle range template for the bombs radius and stores the combatants in the radius instead of the cells, then damage is done to those combatants with a change status value node to subract their hp status value.

    End Outcome: The only time this works is if a combatant is on the exact cell that you put the event on but in a normal schematic the enemies in that radius would just take damage.


    Example2: So if you flip this around and put a cell event on every cell in the bomb radius then you will be triggering the remove schematic for every single cell that is in the bomb radius causing the enemies to take many hits.


    I am curious if this is a bug or if the schematic temporary cell events remove schematic is supposed to function like a normal cell event where it can be triggered by moving off of it or moving on it etc...

    first schematic setup:

    https://prnt.sc/qmyn6sDhJHDR
    https://prnt.sc/am2v2RaqvM91

    Second schematic setup:

    https://prnt.sc/FeUwu6mo8drZ
    https://prnt.sc/jT8EE9e6jUXH

    Charge Template:

    https://prnt.sc/yC9ALNQxvvRC

    Copy Bomb Template:

    https://prnt.sc/xgJWNikdpylS
    Post edited by SagiSaks on
  • Second schematic Select Grid Cells is set up wrong. Use the Machine Object for the origin object, the selected data from the first schematic might not be there any more or something different. Machine object of the remove schematic is the cell itself.
    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!
  • edited November 2023
    Should've showed all my setups but I already tried that as well and still only if the turn ends and an enemy is on the cell will anything take damage, I can spam bombs while all the enemies are around me and when I throw it under enemies as long as they are still on that cell it will hit everyone but even one cell next to them won't work.
    Post edited by SagiSaks on
  • Can you show that setup? Should work if selecting cells is based on the machine object of the remove schematic.
    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!
  • Definitely working on my end - but your Change Status Value node has Show Flying Text disabled, i.e. no flying text is displayed and you might just overlook the status change?
    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!
  • Sorry late reply, was out of office.

    I was just checking their stats in another way but turned on show flying text to make sure and still only works if something is under the bomb after the turns are over. If the schematics look fine to you do you think there could be a problem regarding my bomb item setup.

    Bomb uses the first schematic as a battle animation so not sure if that is a problem or if the bomb item should use an ability called bomb.

    I looked in the rest of the options not sure what it would be in the item itself.
  • Doesn't matter if it's an ability or item - if it uses cell targeting, the schematics have the selected cell as Starting Object (i.e. target of the action). That's where you place the cell event.

    You can send me a Unity test project to check it out if you want :)
    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!
Sign In or Register to comment.