In my combat scenario the user is putting down waypoints (via the mouse). each waypoint will be a location the player combatant
will move to.

I would like to use an ability so it gets run at the end of the round like all other abilities (turn based (classic, dynamic)).

How to create a move (to location or object) ability?
Should I use the MoveAIComponent (the SetMoveAIWaypointsNode adds waypoints which looks interesting) in some way?

ORK: 3.5.0
Unity: 2021.3.7f1
turn based (classic, dynamic)

Thanks,
MMalone
  • It's pretty similar to a schematic for moving to target.

    The ability should use None target range and use raycast targeting for setting a position via mouse. The target is available as Starting Object in the schematic, i.e. you can just move to the position however you want, e.g. via Change Position node.
    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!
  • In my case the target (on the ground) has already been chosen. The ability doesn't do targeting. Just needs to execute a schematic.

    Even if I put the ability on the battle menu it still won't run.

    What schematic node do I use to run the ability? "Use Battle Action" node looks promising, but it didn't work either (may be because the ability isn't working).


    ORK: 3.5.0
    Unity: 2021.3.7f1
    turn based (classic, dynamic)

    Thanks,
    MMalone
  • I got things working somewhat. I copied an existing ability and played around with "Use Battle Action" node settings.

    The current issue I'm running into is that the default AI (I think?) is still run. i.e. my move command runs but so does "Attack", "Look At Me!", etc. depending on which one ORK picks.

    This is what I tried:
    * combatant (warrior): under "battle ai", set "replace default".
    * combatant (warrior): under "base attack", set "own base attack".

    Note: on the start of a combatants turn I run a schematic that looks for input (left button down) then uses "Use Battle Action" to start the move ability.


    ORK: 3.5.0
    Unity: 2021.3.7f1
    turn based (classic, dynamic)

    Thanks,
    MMalone
  • When using the Use Battle Action for this setup, I'd recommend the Next Action type for the Add Action setting (when added in the start turn schematic).
    How do you check for the input - are you waiting for player input or just check if the input is currently used?
    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!
  • "Next Action" didn't work - the combatant didn't do anything.

    Here are some pics of the schematic and the "Use Battle Action" node (still prototyping):

    image

    image

    image

    Would a tick machine work better? Would the schematic need to check who's turn it is or is there another way?

    ORK: 3.5.0
    Unity: 2021.3.7f1
    turn based (classic, dynamic)

    Thanks,
    MMalone
  • Situation is even worse. If I change "Actions Per Turn" to something greater than 1, after the first "Use Battle Action" the battle menu goes away leaving the player stuck in limbo.


    ORK: 3.5.0
    Unity: 2021.3.7f1
    turn based (classic, dynamic)

    Thanks,
    MMalone
  • Is the raycast successful and Use Battle Action is actually used? Also, is the combatant able to use the action (use costs, etc.)?
    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!
  • Yes, the raycast is succeeding. The battle action is being run because my "move" ability is used.

    I was doing more investigating last night and made a little more progress. I made the following changes which I think disabled the default battle ai.
    * check "Own Base Attack". no entries were added.
    * under "Battle AI", checked "Replace Default". no entries were added.

    The problems I'm running into is that the attack ability (I verified the attack schematic is run) is also run (before my ability is run).

    I'm using the 3D Playground tutorial as a base. Anything about the tutorial that might be interfering?


    ORK: 3.5.0
    Unity: 2021.3.8f1
    turn based (classic, dynamic)

    Thanks,
    MMalone
  • If a combatant is AI controlled and has no battle AI added (or the AI hasn't found a useable action), the combatant's base attack is used (if possible).

    If your schematic is running as the start turn schematic of the combatant, adding an action as next action via Use Battle Action node will definitely use that action as the first action.
    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 August 10
    The combatant is not AI controlled.
    Using "next action" via "Use Battle Action" doesn't work, I've already tried it.

    Here is a link to my project (I'm using URP so the colors are all messed up):
    Edit by gamingislove: Please don't post downloads to projects containing ORK :)

    To repro the issue:
    * using the mouse, click to move near the snake.
    * may take a bit because the snake has to have sight of you.
    * skip all turns except yours (the warrior).
    * when it's the warrior's turn the cursor will change to a "box".
    * click anywhere on navmesh.
    * again, skip other combatants turn.
    * this will end the round.

    Result:
    * look closely, noticed how the warrior does an "attack" before moving.

    More than one action per turn issue.
    Repro:
    * change "Actions Per Turn" to 2.
    * run the game and do the same steps as above (click to move when it's your turn).

    Result:
    * after you click to move the battle menu goes away and there is nothing else you can do.


    ORK: 3.5.0
    Unity: 2021.3.8f1
    turn based (classic, dynamic)

    Thanks,
    MMalone
    Post edited by gamingislove on
  • More info...
    * The schematic that does the work is called "SetWaypointsMachine".
    * Disable "Use Ability" node - I was experimenting with it. "Use Battle Action" will be used.
    issue still happens.
    * Change "Actions Per Turn" back to 1.

    ORK: 3.5.0
    Unity: 2021.3.8f1
    turn based (classic, dynamic)

    Thanks,
    MMalone
  • Downloaded the project and will check it out.
    However, please don't share downloads to projects (or other things) that contain ORK - next time send me the download link via PM or email (contact@orkframework.com), thanks :)
    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!
  • Got it!
Sign In or Register to comment.