Recent content by Rick

  1. R

    Attacking

    I also added a SharedGameObject to Attack named Target. This way things like WithinDistance and actions like that can get a target and Attack can use that vs always finding the closest. I use this specifically for when I as the player direct a unit to attack some target that might be far away...
  2. R

    Attacking

    OK, I was thinking I might need to. You would have the object itself to get the position now anyway so just curious why not just pass the object in the first place and we would be able to get the position (or any component for that matter) from it if we needed?
  3. R

    Attacking

    Just got the Tactical pack. Looking at the Attack() method for the IAttackAgent I see it only returns the position of the target not the actual target itself. This works fine for the demo since it fires off a bullet, but I'm looking at melee (sword) attacks. I wasn't going to do any sort of...
  4. R

    Multiple instances of a game object with the same tree

    Nvm figured it out. It was on my side and Mirror specific. In case you're curious, the hunger is a SyncVar and I have a hook to know when it's been updated from the server and inside the hook I update the UI on the screen. Of course with 2 instances both were doing this and it's the 1 UI for the...
  5. R

    Multiple instances of a game object with the same tree

    I created an in variable named hunger. However, in code it's referred to as a SharedInt. The issue I have now is that when I spawn 2 of the same prefab with this BT on it, that value seems to be shared between the 2 instances. In the variable creation in the BT Editor it just said int. Is there...
  6. R

    Access to some kind of Update() method that runs these trees

    That's perfect! Thank you much.
  7. R

    Access to some kind of Update() method that runs these trees

    I'm wondering if we have access to the Update() method that's running these trees? I'm looking to make Mirror work with these things so that the Update method that BD is running will only run on the server. Mirror has a [Server] attribute I can put above methods and then that method will only...
  8. R

    Can See Object by tag

    The food collider was marked as a trigger. That was why. Thanks for your help!
  9. R

    Can See Object by tag

    Any thoughts on Linecast() not coming back with a hit ever? I moved up the positionOffset because my player has this at their feet so I thought maybe it was half inside the ground and it was hitting the ground but that didn't help. Also it's misleading or strange to have the view cone move with...
  10. R

    Can See Object by tag

    First issue was the script variable wasn't getting populated with what I typed (Food) for some reason. The variable was null. You can see I did type it in above though. So I cleared it out and retyped it and now that's coming through. It means it "sees" it when it's in the view cone. However it...
  11. R

    Can See Object by tag

    Hello. I'm playing around with Behavior Designer. I'm creating a character who has a hunger value and when it drops below 75 they'll wander until they see food in which case they should then seek to that food. The issue I'm having is Can See Object is returning the first thing it sees even...
  12. R

    Find doesn't seem to populate variable for other tasks

    Oh, yeah I figured it would do that. Forgot I can just check out the code. Found the issue and it's dumb of course :). Unity appends (Clone) to the end of the name so I had to add that in the Find so Player(Clone) not just clone. My bad :) Thanks for the patience and help!
  13. R

    Find doesn't seem to populate variable for other tasks

    My Player did have an empty BT on it so removed that and that fixed that issue. I'm not sure what you're trying to get at with the docs page of GameObject.Find(). In the BT the Find returns success so it seems like it finds it, but the next WithinDistance task never returns success when I had...
  14. R

    Find doesn't seem to populate variable for other tasks

    Just starting out and I found this page (https://opsive.com/support/documentation/behavior-designer/referencing-scene-objects/) about using Find to populate a variable that other tasks can use. I have a behavior tree on an enemy. While Find returns success the other task, Within Distance, never...
Top