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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

How do I get my pawn to trigger an overlap event?

IMPORTANT: Have done some further BP programming, I have worked out that the only thing wrong with my initial Blueprint was that the Trigger Volume was smaller than the TargetPoint the NPC was running to. This means that the Trigger Volume was never being overlapped. That means, for anyone reading this now, that my first BP is correct. It was my placement in the level that was wrong. I could have got my method to work perfectly, if I had known this, and just increased the size of my trigger volume. Sorry! :)


I have a pawn called BasicAI. He runs to a TargetPoint with a TriggerVolume around it. How do I get the OnActorBeginOverlap event for the TriggerVolume to fire when he reaches it?

The event is set up to fire if the Player enters the Volume by default, and I can't work out how to change it to the Pawn. I've tried connecting the OnActorBeginOverlap event's Other Actor node to Cast To Basic AI, but to no avail.

alt text

If someone could let me know what I am doing wrong, I would be very grateful. Also, points! :)

EDIT: Here is my new BP for the successful patrol, after Raiden's help. It doesn't use the onactorbegineoverlap, but actually serves my purposes better.

alt text

Product Version: Not Selected
Tags:
blueprint.png (151.1 kB)
more ▼

asked Aug 27 '14 at 08:59 PM in Blueprint Scripting

avatar image

Jezcentral
122 9 13 13

avatar image Raiden58237 Aug 28 '14 at 10:52 PM

So in simple terms you want the BasicAI to move from Point A to Point B, activate a trigger and move back to Point A or another Point?

avatar image Jezcentral Aug 29 '14 at 08:00 AM

Actually, I'm using the trigger to send Basic AI to Point C (this is supposed to be the NPC's patrol route). I have no idea how inelegant my solution is, so if you have a better idea, I'd welcome it.

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

2 answers: sort voted first

I hope this helps what you are trying to achieve. I have just created a simple patrol route for an AI bot I am using. What happens is I hit the trigger and the bot moves to the first point which in this case is point 2. After 0.2 seconds he then moves to point 3, then again after 0.2 seconds he moves to point 4 which he then moves immediately to point 2 again but only because I forgot to put a delay at that point.

In short activate the trigger and he moves from point 2, to point 3, to point 4 and then back to point 2. Is this what you wanted?

alt text

patrol1.jpg (137.7 kB)
more ▼

answered Aug 29 '14 at 06:11 PM

avatar image

Raiden58237
97 14 21 27

avatar image Raiden58237 Aug 29 '14 at 06:21 PM

P.S Don't forget your NavMesh

avatar image Jezcentral Aug 29 '14 at 06:51 PM

Don't worry, I didn't forget my NavMesh. :)

This certainly looks like it. Which blueprint is this on?

avatar image Raiden58237 Aug 29 '14 at 07:05 PM

I have done this in the Level Blueprint.

avatar image Jezcentral Aug 29 '14 at 07:43 PM

Right, I'm in a bit of a quandary. You haven't quite answered my question. I asked for a way for a pawn to trigger the onactorbeginoverlap event, and this doesn't actually do this. This just sets a time limit, and changes the destination once that limit has been reached. This means that if the pawn is stopped (by, say, my character speaking to them for the required amount of time, they will no longer make their way to the destination, but the next one (or even the one after that, depending on how much time was lost).

The thing is, if I do what I want, with the overlap event, I'll have a level of NPCs walking around, with clockwork precision. If I stop one of them, that would throw a spanner in the works as they would fall further out of synch with each other, and the beautiful edifice would slowly fall apart. I would need a way to reset their patrols automatically. Which you've just done!

So the quandary is: you've just solved my current problem, and the one I was about to have, but I can only accept your answer once. :) Thank you, so much.

I've posted my new BP in the original question, which is the same as yours, but with the Get Controller added for each Simple Move to Location.

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

Hey Jezcentral-

It seems that Raiden58237 was able to help you solve your issue. If this is correct I will be closing this post as resolved for tracking purposes. If you are still experiencing the same issue that you originally reported please feel free to respond to this post and we will investigate further.

Cheers

Doug Wilson

more ▼

answered Sep 10 '14 at 02:50 PM

(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