How to make an enemy move to a certain location?

I imported enemy in my VR project and now I want to make certain amount of enemies to spawn and go to a pre-defined location (or to a certain object). After spawning it will wait 0.5 seconds and move to the object/location. After reaching it, enemy will wait 1 second and then it will be destroyed. How to define the desired location/object in a blueprint?

Hey @Leverna22!

You can make a variable, let’s call it “Target Destination”, a vector.

Then make that vector Instance Editable by opening the little eyeball icon. Once you save/compile, you can then set that destination for EACH of the AIs made from this blueprint. You’ll do this in your level by selecting the NPC in the world and putting in the coordinates you want them to run towards in the “details” window under “default”! :slight_smile:

Thank you very much for your reply, it helped a lot! I followed all these steps, but I don’t have a VR headset at home, I only have it at the university so I can’t test it properly today. Should an enemy move to the destination after I press button “simulate”?

It sure should! As long as they have a destination set in the level! :slight_smile:

It should work the same with the VR headset, the only difference is the screen, the game should be the same!

1 Like