Looking for some Beginner help.

NodeCanvas Forums General Discussion Looking for some Beginner help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #14371
    sandbox
    Participant

    Hello people.

    I’m new to this whole AI tree and logic thing so I’m jumping in head first into some scary waters here, but maybe i can get some friendly help. I have read through all the NodeCanvas Docs and watched all the online tutorials i could find but i’m just unsure what to do at times.

    First example: I have set up a Character to patrol random points using the “nodecanvas” “Patrol node” but it is just to robotic how the character goes from one point to the next at a even and flat rhythm. What i want to do is add a wait time at each patrol point even randomize the wait time between 2 set values. What would be the way to do this, or would it be better to request this as a new node so its built in?

    thanks

    Attachments:
    You must be logged in to view attached files.
    #14373
    sandbox
    Participant

    I have discovered the the Wait action that i could add to the patrol action node and just add a bunch of them but is there a eraser way to achieve a more random wait time?

    Attachments:
    You must be logged in to view attached files.
    #14375
    sandbox
    Participant

    I figured out away to do it but not sure how i really got there. If i let it run for a few minutes it fails to work properly and the character goes to the edge of the nav mesh and just stays there. It dose not patrol anymore. Is this a bug should i report it?

    The red cubes are the patrol points, and the character is selected. see photo.

    Attachments:
    You must be logged in to view attached files.
    #14377
    anax
    Participant

    Hey buddy welcome. Judging by your posts it seems that you know what you are looking for, it’s just that you need more practice. Bare in mind that the subjects of Behavior Trees and State Machines are  hard to grasp even for a large portion of software developers. I know how you feel because thats how I felt when I started and I still need a lot of practice myself.

    I suggest you find more BT examples on the web and study them. NodeCanvas is just an interpretation of BT theory and it is not necessarily in the scope of the product to explain how BTs work. A good place to start, if you haven’t done so already is: https://www.gamasutra.com/blogs/ChrisSimpson/20140717/221339/Behavior_trees_for_AI_How_they_work.php

    For your example I would also try to use an Iterate Decorator. As for the random wait time remember that you can build your own Decorators. Here is how I have modified a Timeout Decorator to act as a Wait:

    If you want a random timer then you can simply assign a random float using UnityEngine.Random.Range(float min, float max); Best of luck and good practicing!

    #14379
    sandbox
    Participant

    Anax

    Thanks for responding, I will have to look into those nodes you mentioned. I am a artist so I have no coding experience at all, that why I chose a visual scripting asset like nodeCanvas with hopes that I might be able to get some AI put together.

    Thanks again.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.