How to Spawn Enemies (Unity Tutorial | 2D Top Down Shooter)

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 ธ.ค. 2024

ความคิดเห็น • 39

  • @billietheweirdkid8017
    @billietheweirdkid8017 7 หลายเดือนก่อน +2

    Incredibly clear!! My script didn't allow me to add values in the inspector but I corrected it with chat gpt and it worked. I love that every move is backed up with an explanation, as a student I need to understand why I'm doing it.

    • @gamedevben-sc2dt
      @gamedevben-sc2dt 6 หลายเดือนก่อน

      Exactly the same for me too, the why is such a big help, it takes me from copying to actually learning.

  • @sonicgamer178
    @sonicgamer178 หลายเดือนก่อน +1

    This is extremely simple to follow and understand! I didn't know it was possible to do this without Coroutine, so this made life easier lol

    • @KetraGames
      @KetraGames  28 วันที่ผ่านมา +1

      Great to hear, thank you 😊

  • @stevethepirate
    @stevethepirate ปีที่แล้ว +1

    very clean and consise! thanks for the help!

    • @KetraGames
      @KetraGames  ปีที่แล้ว

      Thanks for this comment 😊

  • @maxontheroad4919
    @maxontheroad4919 ปีที่แล้ว +2

    Great Video, keep it up!

    • @KetraGames
      @KetraGames  ปีที่แล้ว

      Thanks for your support 😊

  • @zoterodisuke4398
    @zoterodisuke4398 2 หลายเดือนก่อน

    I am making a 2D Rocket Shooting Game for my class project, and I have EnemySpawner that will increase the spawn every once in a while, but what I don't know how to do is to make more variants of enemy to spawn. Also I kinda want stages so like the higher stage will have more enemies and variants and then a certain stage will have miniboss and main boss.

    • @KetraGames
      @KetraGames  หลายเดือนก่อน

      Hi, this video may help you with the variants th-cam.com/video/ivT8wpwhSzs/w-d-xo.html

  • @jacobzak7494
    @jacobzak7494 3 หลายเดือนก่อน +1

    Thank you! Didn't know it's possible without using Coroutine

    • @KetraGames
      @KetraGames  3 หลายเดือนก่อน +1

      Glad it was useful 😊

    • @jacobzak7494
      @jacobzak7494 2 หลายเดือนก่อน

      @@KetraGames Do you have a vidoe explaining how do you manage to instantiate a bullet in the right angle? What do I need to write in the Quaternion of the instantiate callback? Do you need to compare the Quaternion of the bullet to the angle or direction of the player?

  • @kelnnermagno8760
    @kelnnermagno8760 8 หลายเดือนก่อน

    Great video, and great explanation, thank you so much

  • @qaaap6056
    @qaaap6056 ปีที่แล้ว +1

    Helpful video! I'm going to try to make my player the enemy spawner where it always spawns right outside the camera's view

    • @KetraGames
      @KetraGames  ปีที่แล้ว +1

      Glad it was useful 😊

  • @1tonji_256
    @1tonji_256 11 หลายเดือนก่อน +2

    I dont know why but my Enemys are not spawning? It doesnt create the clones or anything, maybe it correlides with another script but to figure that out... ouf idk

    • @the_agus_tate3966
      @the_agus_tate3966 3 หลายเดือนก่อน

      same problem

    • @the_agus_tate3966
      @the_agus_tate3966 3 หลายเดือนก่อน

      I solve it , in void update you have to put first _timeUntilSpawn -= Time.deltaTime;
      then the other

  • @ftrwar
    @ftrwar หลายเดือนก่อน

    so i have a spawner with a graphic and want to make it destructable treating it like an enemy

  • @TweetyStickFigure
    @TweetyStickFigure 7 หลายเดือนก่อน

    Hey for some reason when I add in the spawner it spawns a few in and then the error: ''MissingReferenceException: The object of type 'GameObject' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object. I assign the enemy prefab to the script but then I get that error after the enemy spawns in a few times

  • @LoganOrr_
    @LoganOrr_ ปีที่แล้ว +1

    Hi! I have a question, If I use a prefab from a folder outside of the scene, it does not know where the player is because the player is in the scene and in the prefab I cannot use things from the scene to be set as the player, and if I use a enemy that is in the scene, when I kill the original enemy, no more can be instantiated, what should I do?

    • @Rjf32
      @Rjf32 7 หลายเดือนก่อน

      Ive been having the same problem have you been able to fix it its been annoying af

  • @codewithtoufeeq
    @codewithtoufeeq ปีที่แล้ว

    When will you upload more parts of this series? 😢

  • @adriankhojason8161
    @adriankhojason8161 25 วันที่ผ่านมา

    Hello, i followed the tutorial, and i have an issue where the enemy only appear in the Scene Screen and not the Game screen, why is that?
    TLDR:
    The enemy spawned but they are invisible in game screen, but all of their logic is there

    • @KetraGames
      @KetraGames  18 วันที่ผ่านมา

      Hi, it may be the background is hiding them. Try disabling the background to see if they appear. If they do then you might need to check your layers are set correctly - th-cam.com/video/Hwq-_IyVlVI/w-d-xo.html

  • @tPlayerioT
    @tPlayerioT ปีที่แล้ว

    instead of Void in method setTimeUntilSpawn()
    i would do a return;
    float SetTimeToSpawn()
    { }
    on which:
    if(isRandomRangeEnabled)
    {
    ((random range here))
    isRandomRangeEnabled = false
    }
    timerUntilSpawn -= Time.deltaTime;
    return TimerUntilSpawn;
    and then put that method inside update and do if using the method because it returns the timer. The boolean would be in inspector so i could reenable it and have multiple random ranges.
    if im not mistaken these should work fine

  • @omar-0082
    @omar-0082 ปีที่แล้ว

    thank you very much ! I tried by myself but could'nt make it work

  • @oziic
    @oziic ปีที่แล้ว +1

    The enemys spawn but theyre like hidden in game view

    • @oziic
      @oziic ปีที่แล้ว +3

      fixed it! i changed my near clipping planes to 0 instead of 0.3

    • @KetraGames
      @KetraGames  ปีที่แล้ว

      Glad you worked it out 😊

    • @desientertainers9706
      @desientertainers9706 11 หลายเดือนก่อน

      Same problem

  • @vanan2235
    @vanan2235 ปีที่แล้ว +2

    Video hay lắm ạ.

  • @oziic
    @oziic ปีที่แล้ว

    Why cant i see my enemys

    • @tPlayerioT
      @tPlayerioT ปีที่แล้ว +1

      set sprite renderer order in layer to 15 which makes them priority on showing in your screen

    • @learnwithmeh1352
      @learnwithmeh1352 8 หลายเดือนก่อน

      maybe check your spawner z axis i had the same issue and the z was set to -10 so they could see me and interACT with me but i couldnt see

  • @MawaJawa
    @MawaJawa ปีที่แล้ว

    I have made it so that the spawning is working but when they spawn they only stand still and wont move, how do i fix this?
    (fixed)

  • @pricemavili9006
    @pricemavili9006 7 หลายเดือนก่อน

    Dört kelimelik destek yorumu