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! :)
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;
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?
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.
I'm getting an error, help please. error: ArgumentException: The Object you want to instantiate is null. error line: GameObject enemyClone = (GameObject)Instantiate(enemyRef);
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
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
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 :-)
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)
@@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. :-)
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).
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!
Hey guys! I'd love to get your feedback on the game I'm making, pls let me know what you think! : ruclips.net/video/t4jnuktZm7I/видео.html
This is such good content. It's really useful to see you thinking through the code as you go
Gran video, no hablo ingles pero pude entender lo que hizo
Nice! Your videos inspire me for doing more. And thanks for respawn! Your videos help me a lot, thank you!!!!
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! :)
@@LostRelicGames Aawwwww, thank you. You too :D
Your tutorials are exactly what i wanted, you're amazing!! Thank you!
Kind words! I am glad you found it useful! Have a great day
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;
Insta sub :) Very useful guide! Please keep'em coming!
Thanks You!
You could create a playlist of all your 2d game dev tutorials, it would be very helpful tho
That's a great idea Eduardo,
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?
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.
I'm getting an error, help please.
error: ArgumentException: The Object you want to instantiate is null.
error line: GameObject enemyClone = (GameObject)Instantiate(enemyRef);
Did you get the solution for this?
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
Hi! Please, can you make a tutorial about sliding?
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
@@LostRelicGames No problems! Just I wrote I would like to see ;) And good lcuk on IndieCade expo! Thank you, you too!! :D
Awesome man!
How would you set it so it only respawns once its off-camera?
Bro how to control the amount of enemies to be spawned from a position.
hey i just would like to say that the last link does not work
Thank you mate!! Keep on teaching us ;p
You are very welcome! I have a lot of good stuff planned for you! :)
@@LostRelicGames Can't wait!
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 :-)
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)
@@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. :-)
Looking forward to more videos!
Thanks!
nice video
you're awesome
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).
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!