So I’m not a programmer and have only a little idea on how BPs work, however I am messing around with AI and watching Tesla’s tutorial on pawn sensing I have made a pretty simple blueprint where he detects me and follows me. And I have added the function to print a string that says “Player spotted” when he detects me. However the string just keeps infinitely printing. And I want this to print just once but I want him to continue following me without it printing again and again. I’ll attach some pictures.
Okay so as far as I understand … Pawn Sensing is triggered as long as there is something to sense … and it will continue to trigger. That is why you are getting the string repeated the entire . At least this is my understanding of that event.
Okay so I did as you guys said and now he prints it just once so I guess that bit is solved, but then he stops following me after a while and then doesn’t detect me anymore even if I’m right up at his face.
Do you guys require screenies of some other stuff as well? For now I’ll attach my blueprint.
Awesome. Worked like a charm. So now he prints it once and follows me around. However when I go out of detection and come back, he does detect me and follows again, but doesn’t print “player spotted” once more. Olli said I could reset this. How do I do this? I tried plugging the end to “reset” but that just ended up infinitely printing it once more.
There is now way to properly detect when Sensing stops.
There are many ways around it.
I have implemented one way, but may not work, but give you a hint.
I needed to set sensing at 0.1, and that worked for me.
What I did, is off a sequence, I set a delay up of 2.5 seconds. I then set a bool to say not sensing. If he is still sensing then it resets after 0.1, so no real delay.
Off your event tick, have another sequence, put in a delay of .2 for example, if after .2, he is still not sensing you, you can then reset set the do once.
Way above my level of understanding, but thanks for the step by step explanation. I guess I’ll have to learn the basics of BP first and then I can apply this.
Thanks for helping out everybody.