Respawn Enemy in Unity (2D Game Dev Tutorial)

  Рет қаралды 16,076

Lost Relic Games

Lost Relic Games

Күн бұрын

Пікірлер: 37
@LostRelicGames
@LostRelicGames 5 жыл бұрын
Hey guys! I'd love to get your feedback on the game I'm making, pls let me know what you think! : kzbin.info/www/bejne/qmXNn6ihqb-gbas
@DharmaPunkGames
@DharmaPunkGames 2 жыл бұрын
This is such good content. It's really useful to see you thinking through the code as you go
@EduardoOliveira-yr3ib
@EduardoOliveira-yr3ib 5 жыл бұрын
Your tutorials are exactly what i wanted, you're amazing!! Thank you!
@LostRelicGames
@LostRelicGames 5 жыл бұрын
Kind words! I am glad you found it useful! Have a great day
@EduardoOliveira-yr3ib
@EduardoOliveira-yr3ib 5 жыл бұрын
You could create a playlist of all your 2d game dev tutorials, it would be very helpful tho
@LostRelicGames
@LostRelicGames 5 жыл бұрын
That's a great idea Eduardo,
@nekit8742
@nekit8742 5 жыл бұрын
Nice! Your videos inspire me for doing more. And thanks for respawn! Your videos help me a lot, thank you!!!!
@LostRelicGames
@LostRelicGames 5 жыл бұрын
You have been a great supporter from the start. There will be more meaty videos soon - talking about game design philosphy, as well as some more detailed game making series. Have a nice day man! :)
@nekit8742
@nekit8742 5 жыл бұрын
@@LostRelicGames Aawwwww, thank you. You too :D
@gambar
@gambar 5 жыл бұрын
Insta sub :) Very useful guide! Please keep'em coming!
@LostRelicGames
@LostRelicGames 5 жыл бұрын
Thanks You!
@MegaJHONDY
@MegaJHONDY 2 жыл бұрын
Gran video, no hablo ingles pero pude entender lo que hizo
@minimangamesrichminimangam7029
@minimangamesrichminimangam7029 3 жыл бұрын
Hey im having a issue where this the word spriteRenderer is underlined and i cant figure out a way to fix it; in the code: spriteRenderer.enabled = false;
@bsigel32
@bsigel32 4 жыл бұрын
This code seems to work fine for a single spawn. What if I want to spawn multiple enemies at once? The code seems to work for the initial spawn but if I spawn a second time, they all want to spawn at the prefab coordinates. Any suggestions?
@LostRelicGames
@LostRelicGames 4 жыл бұрын
Hey Brian the system in the video is specific to re-spawning a single dead enemy. If you want to spawn many you will want to do it from a game manager using a for loop or something like that. Pop by the discord if you like and we can find you a solution.
@OmeedNOuhadi
@OmeedNOuhadi 2 жыл бұрын
Awesome man!
@ozcanberberoglu7730
@ozcanberberoglu7730 4 жыл бұрын
I'm getting an error, help please. error: ArgumentException: The Object you want to instantiate is null. error line: GameObject enemyClone = (GameObject)Instantiate(enemyRef);
@kedarnadkarny4718
@kedarnadkarny4718 4 жыл бұрын
Did you get the solution for this?
@vamikagupta3187
@vamikagupta3187 2 жыл бұрын
in this case, I made a prefab GameObject that would be the enemy prefab that would be used for respawning the enemy. I used the prefab in place of enemyRef and it worked. It is only able to properly respawn once however, so take note of that. I will find a way to fix this issue very soon
@Hugop_arts
@Hugop_arts 3 жыл бұрын
How would you set it so it only respawns once its off-camera?
@antonisp8237
@antonisp8237 5 жыл бұрын
Thank you mate!! Keep on teaching us ;p
@LostRelicGames
@LostRelicGames 5 жыл бұрын
You are very welcome! I have a lot of good stuff planned for you! :)
@antonisp8237
@antonisp8237 5 жыл бұрын
@@LostRelicGames Can't wait!
@dragonballz3686
@dragonballz3686 2 жыл бұрын
Bro how to control the amount of enemies to be spawned from a position.
@gerardoortiz3173
@gerardoortiz3173 2 жыл бұрын
hey i just would like to say that the last link does not work
@jakobfalk4435
@jakobfalk4435 4 жыл бұрын
I just recently found your content and have the past few days binged your tutorials! Really great teaching! I've tried fixing an issue myself but cant seem to find the right workaround. When it respawns it removes the player gameobject from the enemy so it doesn't chase the player. I've used your other tutorial on enemy aggro. Btw Blood and Mead looks great :-)
@LostRelicGames
@LostRelicGames 4 жыл бұрын
Hey Jakob, thanks for the comment. The player will need to be re-assigned though a public property on the enemy. For this you will probably need to setup a game manager script, which is just like a "main" script that every game object can access. I'll have to make a video on it. But of you google "game manager singleton" it should give you some direction. You could also run a transform.Find("Player") from the enemy (only if it cant find the player) - But this Find function is a little dirty (it will do the job in the short term though)
@jakobfalk4435
@jakobfalk4435 4 жыл бұрын
@@LostRelicGames Great! Thank you! It is really cool, that you are so dedicated to help! I'll definitely support you on patreon. I'll try looking into a setting up a game manager. :-)
@jakobfalk4435
@jakobfalk4435 4 жыл бұрын
Looking forward to more videos!
@nekit8742
@nekit8742 5 жыл бұрын
Hi! Please, can you make a tutorial about sliding?
@LostRelicGames
@LostRelicGames 5 жыл бұрын
I've added it to my list! Sorry I am a little behing on my uploads. I'm submitting a game to IndieCade expo this week, and the paperwork involved has been a nightmare. I'll be back on track soon. Have a great Easter man
@nekit8742
@nekit8742 5 жыл бұрын
@@LostRelicGames No problems! Just I wrote I would like to see ;) And good lcuk on IndieCade expo! Thank you, you too!! :D
@danielfernandobaquerorojas2141
@danielfernandobaquerorojas2141 4 жыл бұрын
Thanks!
@markoshivapavlovic4976
@markoshivapavlovic4976 3 жыл бұрын
nice video
@Skellens
@Skellens 4 жыл бұрын
you're awesome
@philfort2
@philfort2 5 жыл бұрын
Most of your issues are caused by putting the respawn functionality on the object being respawned itself. Ideally that functionality should exist elsewhere (some object that is responsible for managing the playing field) I'm also not sure why you're loading from the Resources folder when you could just have a public GameObject field that is assigned the necessary prefab. The Resources folder has a number of issues, one being that files in there are not tracked so will always be included in the final game build even if they are no longer used by anything in your game. Another is that you're referencing by a string (weakly-typed).
@LostRelicGames
@LostRelicGames 5 жыл бұрын
Thanks for the comment Philip, you make some great points! I'll be sure to cover those points in future videos. I try to keep things simple , as I imagine many people watching these videos are beginners, though sometimes as a result some unorthodox techniques may be used (i don't nessesaarily use these techniques in my own projects), - though still accepted within the unity framework. Again, thanks for the feedback!
GameDev Tutorial: HowTo make a Dynamic Grid in Unity C# (2d sprites)
11:35
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 721 М.
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 15 МЛН
啊?就这么水灵灵的穿上了?
00:18
一航1
Рет қаралды 74 МЛН
didn't manage to catch the ball #tiktok
00:19
Анастасия Тарасова
Рет қаралды 34 МЛН
Why you Draw Bad Assets || 2D Game Art
13:00
Nonsensical 2D
Рет қаралды 77 М.
How to make 2D GLOW in Unity!
15:56
Brackeys
Рет қаралды 601 М.
Enemy AGRO AI System in Unity For Beginners ( 2D Game Dev Tutorial )
23:28
System Driven Level Design (My Biggest Mistake)
7:15
Lost Relic Games
Рет қаралды 34 М.
TAS Explained: Super Mario Bros. 3 in 0.2 seconds
19:39
100th Coin
Рет қаралды 332 М.
Why Making Multiplayer Games SUCKS
6:46
Tom Weiland
Рет қаралды 428 М.
How do non-euclidean games work? | Bitwise
14:19
DigiDigger
Рет қаралды 2,4 МЛН
My JOBS Before GAME DEV Sucked
12:21
Lost Relic Games
Рет қаралды 16 М.
I made Games with Python for 10 Years...
28:52
DaFluffyPotato
Рет қаралды 352 М.
Когда отец одевает ребёнка @JaySharon
00:16
История одного вокалиста
Рет қаралды 15 МЛН