Announcement

Collapse
No announcement yet.

Advice on enemy respawn approach

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Advice on enemy respawn approach

    Hi, so I am using the 2d template and have a bunch of bad guys. This is a metroid/castlevania style game but world is more seemless. When I say that I mean, the player is not constantly changes screens based on the area. My areas are much bigger and allows backtracking without changing levels. I want to spawn enemies(not random) at specific locations when in range. I hope I have explained this well enough to get advice on how to go about this. I know a few ways to do it, but I'm curious what other approaches others might use since my way would be terribly inefficient. Open to all suggestions. Thanks

    #2
    Just use a trigger volume to determine when the Player has reached an acceptable range to Spawn your desired Enemies.

    If the Player enters the volume then they are within Range, spawn your Enemies at given location.
    Im an Moderator on UnrealSlackers Discord! Which is a Community driven group of likeminded people here to discuss UE4! Join UnrealSlackers on Discord!

    Comment


      #3
      This is what I assumed. Actually I would have to clear the room(beginoverlap) then spawn the enemies(endoverlap). To avoid duplicating enemies because of backtracking. Just wondering if this is the most efficient way. I'll test it out. Thanks

      Comment


        #4
        Originally posted by Darvos View Post
        This is what I assumed. Actually I would have to clear the room(beginoverlap) then spawn the enemies(endoverlap). To avoid duplicating enemies because of backtracking. Just wondering if this is the most efficient way. I'll test it out. Thanks
        Its reliable, efficient (at least for a 2d Game) and easy to Debug if its not working correctly. I would just create a Spawner Blueprint that has an editable array on it where you can select the types of Enemies you want to spawn and then mark the Spawner with a boolean that says once it has Spawned its Enemies it cannot spawn them again if it is overlapped again (if thats the type of functionality you want).
        Im an Moderator on UnrealSlackers Discord! Which is a Community driven group of likeminded people here to discuss UE4! Join UnrealSlackers on Discord!

        Comment


          #5
          Thanks for the advice. I did set up blueprint that can spawn any enemy and would spawn the one specific one I want based on which trigger volume location. Appreciate the input.

          Comment

          Working...
          X