Randomly spawn health items

As part of this project we have setup a NavMesh for the aliens to navigate in. It has area where aliens can move in and areas where aliens can’t (like the rocks).

I was wondering if it’s possible to randomly spawn health items around areas we can move in? (I want to do something like if X number of aliens are killed then spawn a health item randomly)

I try to do it but I think it’s a volume we directly drag into so I am not sure how to even reference it in blueprint.

One option you can go with using using a node like GetRandomReachablePointInRadius, this makes use of the navmesh currently in your level. Though depending on your navmesh settings it could lead to some unexpected results. Use the player’s location as the origin and give whatever radius you want.


Thanks for info, Do I need to somehow pass my NavMesh to the Nav Data pin? I am not sure how to get a reference to it from blueprint.



That’s grabbed internally, though you can supply your own

Thanks it is working by doing something like this:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms