How to branch two spawning patterns

I have a starting solution to where first type of enemy will spawn from the spawnpoints in a array within 5 seconds each. but im trying to figure out how when the 5 seconds ends, another type of enemy will spawn from the same spawnpoints for 5 seconds once, then it will repeat back to the first enemy (like a cycle). So far, i have this level blueprint nodes to start off, then i got stuck. Any help is appreciate.

2 Likes

Something like this

spawn2

1 Like

can you explain your version a little?

but ill try your version soon today. ill let you know for an update

1 Like

Best thing is to give it a go, tell me if you get stuck :slight_smile:

1 Like

im confused about the select node. How did you get two class references in the enemy class variable? i can only do true and i cant get another reference to put in false?

1 Like

I think you might be having problems with what sort of variable to use. But you don’t need to know, if you do it all by dragging

spawn

select

i did those nodes. To clarify, im trying to figure out how did you get the ‘enemy class variable’ to display two class references. so far, this is my variable tab
image_2025-02-08_150755718

1 Like

When you drag your ‘enemy class’ variable into the graph, it will ask ‘get or set’, you choose set, and you get this

image

then you just drag from the left, like I did in the GIF right above here :slight_smile:

Or maybe you mean this bit?

Please watch the GIF, I dragged from the variable and typed ‘=’

is ‘enemy type 2’ a child and ‘enemy type 1’ is the parent? i went to the right ride of the event graph to the default value list and discover how to make another enemy for the variable to display the two type enemies. Is this was the correct way to do that? for me, that did the trick!

1 Like

i have a quick question about the level blueprint. One of the enemies ive created is supposed the follow the player then destroy itself after touching the player, but ever since coding this spawner blueprint into the level blueprint, the enemy code doesn’t properly work anymore. It only follows the player but it doesn’t destroy. Is it a possibility that the level blueprint can affect the enemy event graph nodes? The spawn points itself? Or that the destroying enemy is a child?

Because we made the ‘enemy class’ variable by right clicking on the spawn node, it’s type is ‘actor’. So you can assign it to any type.

Can you show me the code for destroying when you reach the player?

1 Like

Yes, looks ok, not sure what the problem is there… :thinking:

im not sure either. that code is within the enemy’s own event graph

can it be that its being reference in the level blueprint? Or that both the enemy blueprint and the level blueprint can override (or cancel out) each other can one works over the other and not at the same time?

1 Like

Debug is the name of the game.

Put print strings everywhere. Are they really overlapping, is the destroy call actually being made, etc…

ok ill see that to help me see whats causing it. thanks!

1 Like

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