I'd like to implement certain movement restrictions in my game so that a combatant can only move in a certain way - like a figure in chess, for example. There's no option to do it by default, so I've been wondering what would be the best way of doing it?
  • Hm, yeah ... that might be a bit tricky.

    I'd recommend not using the move command, but using an ability instead.
    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 March 2018
    Yes, that's what I thought as well. After some googling, I did come up with a thread where MatrixDragon something very close to what I intended to do, but the information there is incomplete, and it feels like I'm out of my depth.
    Post edited by Varzov on
  • edited March 2018
    So I've tried implementing the bits of the same event Matrix Dragon used - and interesting stuff happened, the event doesn't even fire.
    image
    There's no console output, and no matter what I put in the first step, it simply doesn't execute.
    Post edited by Varzov on
  • Make sure this is a battle event and used by the ability in your battle system type.
    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!
  • Double-checked it, but no, everything looks just fine at the first glance.
    image
    image
  • Are you using a Console type HUD to show the console or enabled printing the ORK console to the Unity console (set up in the console settings)? The Add Console Line node only prints to the ORK in-game console, which doesn't print to Unity console automatically.

    Most likely the event is firing, but the setup might be wrong. Could you post the details of the Search Objects 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!
  • edited March 2018
    You're correct - it was exactly that, the event is firing, it just isn't set up correctly, that's why it isn't doing anything. Here are the node parameters for the Search Objects node.
    Limiting search range, like Matrix Dragon originally suggested in his thread, doesn't seem to do much.

    image
    Post edited by Varzov on
  • edited March 2018
    Hm, yeah ... this will find a cell based on the target combatant, i.e. it'll most likely be the target's cell - which isn't empty (since the target occupies it).

    Also, when using the target actor, you don't need to use searching for objects, as you can directly access the target's cell through that actor.

    When your ability uses target cell selection (available for None target ranges), the selected cell is available as the target actor as well, so you don't need to search for it.
    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!
  • So I was doing pretty much everything wrong.
    Thanks, gil!

    Of course, this opens another can of worms, because now that it's at least possible to move, I need to find a way to block the cells occupied by other combatants from being selected.
  • Hm, I'll look into adding a setting for the battle ranges to add/omit occupied cells. That should solve this by using a range omitting occupied cells in the use range of the ability.
    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!
  • That'd be great, thanks!
  • Will be in the next update (which will be released today :D).
    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!
  • Well, that was FAST :D
    Thanks again gil!
Sign In or Register to comment.