x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Ai behavior tree task, target location is invalid.

Hey all. I've began work on my ai cause I wanna start making ti so my buildings will build from the ai but I'm running into an issue where my target location is appearing invalid.

Basically I spawn the ai with a button then place a building that needs constructed, they run to the entrance and begin construction. The target location keeps showing up invalid and the behavior tree won't even execute the command.

For some reason setting up is valid nodes also seems to do nothing. I'm really at a loss here cause I don't understand why it's not working, additionally the building can't be blocking the navmesh/entrance as the "entrance" is the sphere in the middle of the collision box.

Any help appreciated

Here's my code

Product Version: UE 4.21
Tags:
more ▼

asked Jan 09 '19 at 04:32 PM in Blueprint Scripting

avatar image

PerCat
17 1 2 6

avatar image Nebula Games Inc Jan 09 '19 at 06:19 PM

Check your blackboard and make sure you spelled "Target Location" EXACTLY as it is spelled in the blackboard, otherwise it will think its a different variable. Even if there is one "space" extra in the variables it won't recognize it.

avatar image Nebula Games Inc Jan 09 '19 at 11:46 PM

Also where do you set the proxies array? If that doesn't have at least 1 element your branch node will always execute the "false" and your behavior tree will never "finish" execute, which is required for a sequence node to move to the next task. So if it can never "finish" execute because the array is empty, no value is ever set for the target location and the BT stalls on that one task.

avatar image PerCat Jan 10 '19 at 05:03 PM

Well looking at my code the construction proxie has nothing to pull from an array which is weird cause I'm following a tutorial series and his is setup the exact same and works fine. Hmm. alt text

screenshot-97.png (570.7 kB)
avatar image Nebula Games Inc Jan 10 '19 at 07:39 PM

Dunno what to tell you man, but that would be the issue with your BT, something is wrong with the setting of those arrays. Need screen shots of how those get created.

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Chances are the building is blocking the navmesh, hence your ai can't nav to it. causing it to fail.

more ▼

answered Jan 09 '19 at 09:52 PM

avatar image

Evigmae
1.5k 6 3 7

avatar image PerCat Jan 10 '19 at 05:03 PM

I don't think that's the problem though cause the entrance is actually outside of the mesh's bounds by "50". Only thing that could be blocking would be the collision box but it's set to ignore everything.

avatar image Evigmae Jan 10 '19 at 08:40 PM

press P to see the navmesh. just make sure.

avatar image PerCat Jan 12 '19 at 05:21 PM

I think your right! The sphere is where they need to go to. I'm a total noob tho so sorry if this is stupid but how would I go about fixing this?

alt text

avatar image PerCat Jan 14 '19 at 12:43 PM

Shit I think your right my bad, any idea how to fix this? Sorry if I'm being dumb total noob over here.

alt text

avatar image Nebula Games Inc Jan 14 '19 at 02:08 PM

If you open your house mesh and check collision to see where the boundaries are is the collision a foot or two away from the house like the area blocked out of the nav mesh? If so you need to redo the collision in the modeling software to more closely match the house, move the sphere further from the house or check the option on the mesh for "use complex as simple" collision (more expensive as collision is detected per poly)

avatar image PerCat Jan 15 '19 at 01:00 AM

No the collisions are correct, hmm. I just think the tutorial I watched is incorrect now. I'll have to figure something else out then, thanks anyways man.

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question