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"

[Closed] What's the right way to play a montage over the network from a BTTask?

So I have a real simple behavior for an AI to run up to an enemy and do a melee attack. The plan was to use a montage to play an attack. But I need this to be replicated to all the clients. So I was going to have a BTTask (blueprint) call a custom event on the Character. My issue is I need to know when the animation completes. So the task needs a "completed" event or the duration to know when to complete. Events do not have an output. I'm kinda in a loss for figuring out the "right" way to do it. Everything I come up with is hacky.

Also when I hit " ' " key to see the AI debug on a 1 client and dedicated server. I'm I looking at the debug on the server or client? Is there control for that? Does the BT run on the client? How is that controlled?

Product Version: Not Selected
more ▼

asked Jun 17 '16 at 08:23 PM in Using UE4

avatar image

Answers.Archive STAFF
2k 212 318 698

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The question has been closed Jun 17 '16 at 08:24 PM by AndrewHurley for the following reason:

The question is answered, right answer was accepted

1 answer: sort voted first

Hey Troy,

You've asked two unrelated questions in a single thread, so I'll answer the AI debugging part, and I'll assign someone on the animation team to answer the animation question.

The GameplayDebugger (the " ' " tool) replicated information from the server and there's no direct way of making it display data from the client. This actually sounds like a useful feature, so I'll file a ticket for it, but don't hold your breath waiting for it.

BTs, like the whole of UE4's AI system run by principle only on servers. Having said that AI and Navigation systems can be instantiated on the client as well. For NavigationSystem you need to enable client-side navmesh creation by adding following to your project's DefaultEngine.ini:


As for AISystem, you'll need to modify engine sources, since the change that allows to control that via ini settings is not in 4.10 (coming in 4.11). You need to go to UWorld::CreateAISystem and remove the WITH_SERVER_CODE || WITH_EDITOR macro.

Note that you can still run into issues if you wanted to spawn AIControllers on clients. Also, following a navigation calculated on a client can turn out to be tricky. I haven't tried it myself, so let me know if you run into any issues.



more ▼

answered Jun 17 '16 at 08:23 PM

avatar image

Answers.Archive STAFF
2k 212 318 698

avatar image Answers.Archive STAFF Jun 17 '16 at 08:23 PM

Sorry about the AI/Animation in one question :) I can paste that in a new question if they like.

I need to proofread what I ask, because I butchered that question. I wasn't looking to do AI on the clients. I'd want it all running on server for sure. I was just wondering if the debug info I'm looking at on client 1 is what is running on the dedicated server.

My assumption was that the BT is ticked on server and there isn't an instance on client (that sounds right). But I wasn't sure if the debug info was showing me some ghost client BT that was ticking when it shouldn't be. If that makes any sense.

Sounds like my assumptions are correct. I just got to see why when I do dedicated server the perception system doesn't seem to send me events of actors coming into perception range.

Other than that, the AI tech has been fun so far:)

avatar image Answers.Archive STAFF Jun 17 '16 at 08:23 PM

I usually look for worst-case scenario in UDN questions to cut down on number of posts, so that might have been me ;)

In short: AI in UE4 is by default server only, and the tool we've build for AI debugging take that into consideration.

Other than that, the AI tech has been fun so far:)

Glad you like it :D

Regarding perception issue, if it's about sight then UAISense_Sight::Update is where the magic happens, and if your AI that's not getting the notifies is not in SightQueryQueue then debug what's going on when GenerateQueriesForListener is called for that AI.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Follow this question

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

Answers to this question