Hello, newbie here…
I made an overlap event that triggers a movement from my npc, is there a way to make sure the overlap isnt triggered again until the movement from the npc is done?
Npc is moving using aimoveto if that helps.
Hello, newbie here…
I made an overlap event that triggers a movement from my npc, is there a way to make sure the overlap isnt triggered again until the movement from the npc is done?
Npc is moving using aimoveto if that helps.
Hey @MattiasUmaerus! Sure can!
You can use things like DoOnce nodes to only let code trigger once until it’s reset- which you can have happen once the movement is completed. But that’s about as much as we can do without more info!
Pictures are worth a thousand words! Don’t be shy, we were all newbies at one point!
If we knew, for instance, if the overlap code was on the player or on the NPC, that would help.
So would a picture of the code itself!
Get back to us soon!
of course thanks you i will try to upload some picture!!
BP from the player character
BP from the NPC
i basicly try to make the overlap not able to happen again until the npc has reached its aimoveto command. I been trying with branch and different custom events but no luck!
Put all the code in the NPC. Have it detect the flashlight cone (Begin Overlap).
Flashlight Begin Overlap -> Branch: bSpotted? [False] -> Set bSpotted? [True] -> Move to
On Move To : success -> Set bSpotted? [False]
The flashlight cone is attached (it’s a static mesh) in the blueprint to the player character, should all
Code still be in the Npc? I had trouble getting I to trigger when I tried that?
I’d create a custom collision for the flashlight mesh.
Add a capsule collision component to the NPC and have it only overlap the flashlight collision type. Create an Overlap event in the NPC.
This will allow the NPC’s to detect the flashlight themselves.