Enemy Infinite Spawner - 2D Top Down Shooter - Unity Tutorial

Enemy Infinite Spawner - 2D Top Down Shooter - Unity Tutorial

Muddy Wolf

1 год назад

34,716 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@samrat2991
@samrat2991 - 03.01.2023 04:08

for the next part of the series can you add a map :)

Ответить
@dusklightcreations3951
@dusklightcreations3951 - 03.01.2023 06:13

Next part of series on adding map

Ответить
@christoffer280
@christoffer280 - 03.01.2023 11:10

Awesome Guide! do you have plans on making a boss fight with boss room?

Ответить
@infonology
@infonology - 19.01.2023 05:48

Great tutorial! How to let the enemies shoot too?

Ответить
@callumcandy4153
@callumcandy4153 - 07.02.2023 19:30

If you're having issues with the enemy spawner not spawning all types of enemies, make sure to remove the -1 to the length of the enemy prefabs for the range of enemies that can spawn.

Ответить
@ytpotr
@ytpotr - 16.02.2023 17:09

make wave system please!!!

Ответить
@BLACKDREAMIO
@BLACKDREAMIO - 22.02.2023 11:24

please can you make the full system i mean | First a in wave 1 there will be like 10 enemies then after you kill the enemy in wave 1 the wave 2 will start and in the wave 2 the enemy will be 20 and like this a infinite wave



please i have been looking this type of video for a long time but coulnt find

Ответить
@j_davidson9313
@j_davidson9313 - 02.03.2023 03:57

Legend honestly

Ответить
@j_davidson9313
@j_davidson9313 - 04.03.2023 17:33

Hey mate would there be a chance you can make a tutorial for enemies to get more difficult as time goes on?

Ответить
@kikobangarang4992
@kikobangarang4992 - 15.03.2023 18:00

If your target is none, how is the enemy following you??
I have a problem in my game that when i spawn my enemys they dont follow you because it spawns a prefab and the target is set to none.
Can someone help me?

Ответить
@jaikomodo
@jaikomodo - 29.03.2023 14:01

Something about the transform.position, Quaternion.identity bit causes my enemies to spawn invisible in the game tab but if I move over to the scene, I can clearly see the enemy sprites. Any clue how to fix that? If I remove that bit of code then the enemies spawn at their prefab position instead of the spawner position and if I just get rid of the Quaternion.identity, then I get an error.

Ответить
@kiwicryptonfts2383
@kiwicryptonfts2383 - 03.04.2023 10:52

im having issues of when i kill the 1st enemy, no more enemy spawns , i dont really know why

Ответить
@pallaskatze7653
@pallaskatze7653 - 16.04.2023 19:12

Really concise and helpful, thanks my guy

Ответить
@WeirdGoat
@WeirdGoat - 27.04.2023 07:03

No pooling? Just instantiate and destroy prefabs 1 by 1? Or I missed that part

Ответить
@nameless._.5564
@nameless._.5564 - 07.06.2023 08:40

Can you let them spawn faster over time?

Ответить
@Chocoletter
@Chocoletter - 18.06.2023 15:24

thanks man needed this

Ответить
@nguyenhuynhthienphu5286
@nguyenhuynhthienphu5286 - 26.06.2023 07:18

i love you
<3

Ответить
@AlessandroBettini-v6m
@AlessandroBettini-v6m - 26.06.2023 18:07

I did something very similar with 3 life for the player, so that when it got hit 3 times he died and the game have to restart but I have a problem, I can't make all the enemies that were in the game deleted. So what happens to me is that when the player die it starts a new game and the enemies from the game before that are still there and it basically die istantly. Hope I explained myself, any way of resolving this?

Ответить
@Манимейкеры
@Манимейкеры - 09.07.2023 08:57

great tutorial

Ответить
@thedemr9736
@thedemr9736 - 18.07.2023 19:26

i drag my enemy to the enemy pre fabs part but it doesn't go in and my cursor turn into a forbidden symbol

Ответить
@lukson1239
@lukson1239 - 30.07.2023 01:37

thanks for the amazing tutorial mate :) 👍

Ответить
@horisadiafyama
@horisadiafyama - 17.08.2023 14:54

why not use only one spawner and randomize the position?

Ответить
@moeether4940
@moeether4940 - 22.08.2023 21:27

What are the Extentions you are using?

Ответить
@astroxxie
@astroxxie - 30.08.2023 00:24

I get this error

UnassignedReferenceException: The variable enemyPrefabs of ZombieSpawner has not been assigned.
You probably need to assign the enemyPrefabs variable of the ZombieSpawner script in the inspector.
UnityEngine.Object.Internal_InstantiateSingle (UnityEngine.Object data, UnityEngine.Vector3 pos, UnityEngine.Quaternion rot) (at <e97d84204f8d4aef92b538c5bab948f1>:0)
UnityEngine.Object.Instantiate (UnityEngine.Object original, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation) (at <e97d84204f8d4aef92b538c5bab948f1>:0)
UnityEngine.Object.Instantiate[T] (T original, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation) (at <e97d84204f8d4aef92b538c5bab948f1>:0)
ZombieSpawner+<Spawner>d__4.MoveNext () (at Assets/Scripts/ZombieSpawner.cs:28)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <e97d84204f8d4aef92b538c5bab948f1>:0)
Here's script

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ZombieSpawner : MonoBehaviour
{
[SerializeField] private float spawnRate = 1f;

[SerializeField] private GameObject[] enemyPrefabs;

[SerializeField] private bool canSpawn = true;

private void Start()
{
StartCoroutine(Spawner());
}

private IEnumerator Spawner ()
{
WaitForSeconds wait = new WaitForSeconds(spawnRate);

while (canSpawn)
{
yield return wait;
int rand = Random.Range(0, enemyPrefabs.Length);
GameObject enemyToSpawn = enemyPrefabs[rand];

Instantiate(enemyToSpawn, transform.position, Quaternion.identity);
}
}
}

Ответить
@monio_
@monio_ - 08.09.2023 16:52

I get an error that says the "Lenght" is not described at all.
I can't progress further

Ответить
@anonymousme3571
@anonymousme3571 - 09.09.2023 16:40

Hi! How do you get that pop-up that gives you some details of what you've typed? I'm also using Visual Studio - or is that some sort of plugin?

Ответить
@Shibasensei
@Shibasensei - 06.10.2023 12:52

It's scary how much we look alike . The beard to the glasses to the hair :p Great series

Ответить
@desientertainers9706
@desientertainers9706 - 13.01.2024 17:03

Enemy is not moving ..😢😢

Ответить
@NubbyGamerYT
@NubbyGamerYT - 07.05.2024 21:03

When you finally find the tutorial you were looking for!

Ответить
@glowstickqueen7139
@glowstickqueen7139 - 04.08.2024 02:23

Now I have an endless supply of squares

Ответить