Announcement

Collapse
No announcement yet.

Problem spawning actors through a portal

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

    Problem spawning actors through a portal

    Greetings, I am fairly new to visual scripting and I am having trouble creating a portal through which evil cylinders pop out at regular interval and follow you.

    I have set up an EvilCylinderAI Blueprint, an EvilCylinderPawn Blueprint and an EvilSpawner Blueprint.
    The AI is a simple command that says at begin play,wait a second then follow the player.
    The Pawn is a simple command that says when it recieve a hit it is destroyed and explodes.
    The Spawner is where I think I am having troubles. I made a command that says every 0.5 second, spawn an EvilCylinderPawn at the Portal location. The Portal location is a static Mesh (a sphere) I added as a component of the spawner blueprint.

    When I play the level, nothing happens with the location of the spawn connected to the GetWorldLocation of the portal, like pic related. When I delete the nodes connected to the location though, the EvilCylinderPawn spawn at the middle of the map.

    I do not understand what is wrong with my spawner. Could anyone tell me what am I doing wrong? I would like my Pawns to spawn at the location of my Portal.

    Many thanks in advance.
    Attached Files

    #2
    Are you trying to have a particle system play around the pawn when it spawns?

    Comment


      #3
      Try disconnecting the OnComponentHit for your cylinder. It could be possible that the cylinder ends up colliding with the portal mesh as soon as it is spawned and gets destroyed immediately.
      Unreal Possibilities
      Wave Spawning System | Tower Defense Starter Kit
      NEW: FPS Tower Defense Toolkit v3.10

      Comment


        #4
        Originally posted by Stormrage256 View Post
        Try disconnecting the OnComponentHit for your cylinder. It could be possible that the cylinder ends up colliding with the portal mesh as soon as it is spawned and gets destroyed immediately.
        Thank you for the answer. I disconnected the OnComponentHit, but still nothing happens. When I Print String to debug, my EvilCylinderPawn never gets spawned with the location set the portal via getworldlocation. However, if the location is set to x=0,y=0,z=0 when the location is disconnected, my Cylinder does spawn and the Print String confirm that many cylinder are being spawned.
        Originally posted by aceofspades230 View Post
        Are you trying to have a particle system play around the pawn when it spawns?
        Right now I am just trying to make them spawn at Portal location. No particle effects beside the explosion when being hit..

        Comment


          #5
          Is the portal a static object in the world? If so, you can put your spawner cylinder at where the portal is and follow this tutorial: https://youtu.be/8kSWLUf3jFM. This helped me a lot with my project. Make sure you also have the Navmeshbounds Volume overlapping the floor of your level so the pawns know where they can move after they spawn.

          Comment

          Working...
          X