• edited January 2022
    It took me a bit, but I've tried both the setups :)

    1) the click-move to range now works but player goes back to the original position after each attack, even if there is no schematic for that behavior (only moveToTarget and BaseAttack).
    My guess was the Combatant Destination remains active. Since I didn't know how to use the mouse input for a new destination, I just added a Call Function Node to the Base Attack schematic to stop the player (using the Stop Method from the Default MovementComponent).

    image

    Unfortunately the action doesn't seem to get interrupted (Wait for Input also requires a time, which is unknown since the Change Position Node>Move By Speed = true, so I put a random value of 3s)

    2) Unfortunately also this setup doesn't seem to be interrupting the player action, not sure what I'm doing wrong :(
    This is how I set it up. I used the right mouse Input button for testing

    I added to Editor>Variables>Define Variables the variable playerActionMove

    I created this schematic
    image

    and placed it here
    image

    with this MoveToTarget schematic
    image
    Post edited by ChimpLogik on
  • Hm, is the Change Position node waiting for the move to finish?
    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!
  • It was, but I just tried also without Wait but it doesn't seem to make any difference.

    I used some Unity Console nodes and did some tests to see which nodes were activated and this is what I had:
    1) the variable playerActionMovement sets to true (but never back to false)
    image

    2) the Middle click is detected from the Global Machine schematic
    3) nothing in the global machine that refers to the Player seems to be launching...

    image
  • By any chance, do you use a separate player and battle leader?
    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!
  • I don't think so, the Player Battle Information component says Is Leader = true
  • Hm ... alright, can you send me a small Unity test project with your setup?
    Removing the Library folder form the project's folder will reduce the size, upload it to dropbox or something like that and send me the link to contact@orkframework.com :)
    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!
  • Yesterday I added a Test() function to one of the Player components and it worked, so the Player Object is selected from the Global Machine after all.
    The Stop Battle Action doesn't seem to do anything though. I checked the Battle Information and it remains unchanged before/after the Input Interrupt is performed.
    image

    I tried adding a StopMovement node with Object=Player and while it stops the action, after that the Player can't perform any actions anymore, it can only move and remains stuck in that state forever..

    image
  • As said, I'll need a Unity project with your setup to check out.
    It's working on my end (very simple setup, just stopping the player's action on right click via a global event).
    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!
  • Fair enough, I'll need a bit of time to do some major house cleaning though. Even without the Library folder my project is over 20Gb :|
  • edited January 2022
    I duplicated the project to start downsizing it, but in the duplicated project I got this error and it looks like all the player's HUDs are gone :(

    image
    Post edited by ChimpLogik on
  • You probably removed a UI box prefab that's used by the battle info notifications (Battles > Battle Texts > Action Info Notifications).
    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!
  • Issue is, this happened before doing any changes to the duplicated project, literally right after the duplication.
    I tried duplicating the project twice and the same error occurred both times.
  • Hm, it's probably missing scripts from library reconstruction (did that happen?) - reimporting Assets/Gaming Is Love/Makinom 2/ (i.e. the DLL files) and probably your UI prefabs should fix this.

    Still searching for why this happens when the library is recreated ... Unity splitting off functionality into packages introduced all kinds of strange issues.
    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!
  • Ok, it took me many attempts but I'm moving forward and while the action interrupt works, now the problem is stopping the player at a set distance from the target.

    I'm using a custom Movement Component and my movement is handled by a pathfinding solution, so I am calling a function to get the target position and storing the result for my Movement Component function MoveTo(speed, position).

    Problem is, I don't know how to make the player to stop at the right distance, since I couldn't find a schematic node that would do something similar to: Wait Until reached distance.
    This is what I have in the schematic:
    image

    I tried looping the schematic from Vector3 Check Distance back to Store Function Result with the target position (in case the target moved) but didn't work :(

    Note: I also had to use Block Player Control Nodes because the custom Movement Component automatically calls Stop() every frame when the player is stopped, effectively preventing any movement.
  • edited February 2022
    You'll usually handle this with a loop of nodes in your schematic, i.e.:
    - check node
    - success > continue with schematic
    - failed > link wo Wait node with 0 second wait (continues next frame)
    - wait node loops back to the check node (or first do some position updates for your checks, depending if it's needed)

    I.e. the check is repeated each frame until it succeeds.

    You can also add further saveguards, e.g. setting a timestamp (i.e. setting a variable to game time + an offset) and checking that in the loop to exit it after some time.


    Alternatively, does your movement solution have functions for that? You could also call that - or create custom nodes that handle it and continue when the movement solution reported it reached the target.
    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!
Sign In or Register to comment.