Hi Gil,

How would I teleport a combatant when they step on a grid cell.
Grid cell Event :Move to
Type: schematic

This is where i have issue.
First: check grid cell type (i will have various teleport types, eg Teleport1A and Teleport1B - these will be linked)

But where to from here? I want to move combatant into air quickly, and then move to target grid cell.
  • If you want to use a specific cell, you can use the Grid Cell From Coordinate node to use grid coordinates (you can see them when selecting a cell in the inspector) to get the cell.
    Or if it's relative to the current cell, use a Select Grid Cells node.

    The rest is just moving the game object as you want it to move - and don't forget to use a Set Grid Cell Combatant node to set the combatant on that new cell.

    If this happens during movement and you want to stop the rest of the grid path, try using a Stop Battle Actions node to stop the actions of the combatant.
    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!
  • Thanks, I'm getting somewhere, but no matter what I try, it either doesn't do anything (enter the Vector3 type as Value) or moves me to Grid cell 0,0 when I choose Vector3 Value type as Grid Cell Position.

    I'm using Grid Cell From Coordinate node,

    image

    Example, I want to move to cell 15,21
    I've tried 15,21,0 & 21,15,0 & 2.25,-2.08,-0.75

    Can you advise what I need to set values as?

  • edited September 28
    The first Vector3 Type for the Coordinate In Grid should just be Value, and you define the coordinate value there.

    The Grid Cell Position type you're using here is something completely different, using Makinom 2's game object grid system, which is not related to ORK's battle grids.
    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!
  • oh man, pulling my hair out over this.
    I''ve changed to value, and given the co-ordinates from the inspector.
    Also added a node to display the value of the cell data, but it's given me 0,0,0 instead of selected data.

    any idea where I'm going wrong?
    image
  • Yeah ... you're nearly there. The cell coordinates are not the position of the game object.

    They're displayed in the Battle Grid Cell Component inspector, i.e. the Row and Column for square grids. So, your coordinate would be X=row, Y=column, Z=0 - in case of that cell it's X=14, Y=22, Z=0.
    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!
  • OMGOODNESS, thank you. I swear I've tried that before, but whatever magical combination I have now works. Appreciate your patience as always.
  • Hmm, thinking about modularity, instead of hard coding these teleport points, is there a way to get the location from a grid cell type? That way I can use a single schematic on multiple maps, and have e.g. GridType Teleport1B in different locations each time.
  • Not in one go, but it's doable.
    First, use a Select Grid Cells node to get either all cells or just the cells within teleport range.
    Next, go through them one by one using a Select Selected Data node (select type First and enable Remove). Use a Check Grid Cell Type node to check if it's the teleport type, if not, connect back to the Select Selected Data node, if yes - you're done and can do your teleport stuff :)
    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.