Recent content by Pietrofonix

  1. P

    Is it possible to limit the value of a local variable of a Behaviour Tree?

    No, I want to use the range attribute freely with all shared variables, but it doesn't work. Example: [Range(1, 10)] public SharedFloat myFloat; Doing so the inspector of the node is empty, it doesn't show anything. If I remove the range attribute I can see the variable. I'd like to assign the...
  2. P

    Is it possible to limit the value of a local variable of a Behaviour Tree?

    Thank you for the answer. I tried the Range attribute, but it only works with the normal variables, not the Shared ones. Doing so the inspector only change inside the node of the behaviour tree but I don't want this. It would be better if the designers could modify the parameters directly within...
  3. P

    Is it possible to limit the value of a local variable of a Behaviour Tree?

    Hi guys, I have a question about the value of local variables of a behaviour tree. Basically in a MonoBehaviour script to limit the value of a public or serialized variable you need to put the Range attribute before it. Example: [Range(1, 5)] public int x; Is it possible to do it for the local...
  4. P

    Multiple behavior trees or a single one for Idle and Patrol?

    Ok perfect, thank you very much ?. Sorry for all these questions, I'm new to Behaviour Trees and I'm trying to learn as much as I can
  5. P

    Multiple behavior trees or a single one for Idle and Patrol?

    Ok, but what if certain enemies only stay in Idle during oversee, and others only in Patrol? Should I create a node inside the single tree that checks the type of the NPC, where the Behavior Tree component is attached, and switch branch based on that?
  6. P

    Multiple behavior trees or a single one for Idle and Patrol?

    Hi guys, I'm working on a behavior tree for the enemies and I have a question. The detection branches are the same for everyone, but there are essentially two types of overseeing behaviors (there can be more), Idle and Patrol. If I want to distinguish this behavior inside the tree, do you...
  7. P

    How to access local variables of Behavior Designer from node' scripts?

    I RESOLVED Just type: VariableInYourNode = (SharedGameObject)Owner.GetVariable("LocalVariableName");
  8. P

    How to access local variables of Behavior Designer from node' scripts?

    Hi guys, I'm trying to assign this local variable I created in Behavior Designer inside one of the node' script but I can't find a way to access It. I know that for Global Variables I can type GlobalVariables.Instance.GetVariable(""); but for the local ones what's the code? Is it possible or do...
  9. P

    SharedGameObject can't access components with GetComponent

    Oh yes, I'm such a fool, It was so easy the solution. Basically I forgot that the global variable "AudioObjectDetected" was null, and when I was tryng to assign the variable runtimeFaceObject to It inside Start, Unity couldn't find anything. I had to comment the line "runtimeFaceObject =...
  10. P

    SharedGameObject can't access components with GetComponent

    Hi guys, I need help with the Shared Variables. I created a Global Variable of type GameObject in a Behaviour Tree called "AudioObjectDetected" and I want to assign it to a SharedGameObject variable that I created inside a Node. public class BDFaceObject : Action { public...
Top