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"

How to - AI Character and Player overlap event

Lots of questions. I managed to move AI characters randomly in the field. Now I want to process an event when my player and AI character overlap. 1. It seems logical to use only capsule component for that. Am I right? 2. On Viewport of the blueprint of AI character and my player, should I do anything with collision? 3. I added OnBeginOverlap event in both AI character and Player - but I don't know what to do with them. (I wish to see how a good script looks like in similar case.) 4. What settings to make in the AI character blueprint and my player (ThirdPersonCharacter) blueprint? 5. Replication. Should I set Replicated ON for capsule and/or for mesh (I have two player game)

Ideally, I want my two meshes attach to each other (or just snap for a while and then detach after a delay. I think, meshes shouldn't overlap, only capsules!

Anything, guys please let me move on from being stuck here!

[1]: /storage/temp/267896-graph2.jpg

Product Version: UE 4.21
graph2.jpg (198.2 kB)
more ▼

asked Feb 08 '19 at 05:10 AM in Blueprint Scripting

avatar image

77 5 7 6

avatar image Nebula Games Inc Feb 08 '19 at 06:14 AM

This tutorial should help with the collision part. The other part is use the node "attach to actor" or "attach to component". You can use "detach from" nodes to remove whatever you attached.


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

1 answer: sort voted first
  1. Depending on how the character looks, either capsule or sphere. Sometimes box.

  2. You should consider collision carefully. What does it need to get blocked by, what does it need to overlap. What's also important is what they detected as, this lets you create your own collision types which can be extremely useful.

  3. These nodes are exactly what you want, maybe substitute "On even hit" is necessary sometimes, but you'll figure that out. I'll give you two examples. The one on the left is for checking whether a chest has contents and then spawning an emitter once my character gets within a certain range of it, the second one is for doing damage with a weapon capsule (sometimes you may want a DoOnce node here). Notice how I always check if it is overlapping the player character, not something else.

alt text

4 - Not sure what you mean and I think any answer I give might just add confusion.

5 - I know literally nothing about networking so someone else would have to help you out. Here's some links to read up on if needed:

https://wiki.unrealengine.com/Replication https://docs.unrealengine.com/en-us/Resources/ContentExamples/Networking/1_1

example01.png (504.1 kB)
more ▼

answered Feb 08 '19 at 07:08 AM

avatar image

Crowley Caine
693 8 10 16

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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