HOW TO RANDOMLY SPAWN ENEMY POSITIONS WITH C# UNITY TUTORIAL

preview_player
Показать описание
In this Mini Unity Tutorial I show how you can randomly spawn your enemy positions in your game.

-----------------------------------

✦ Start your game development career today in Unity 2017 - Unity 2018.1 and even Unity 2018.2 and learn how to make a game through the power of Unity. Every Unity Tutorial at JV Unity costs NOTHING from you, and any support received through YouTube, Patreon or Facebook is greatly appreciated.

-----------------------------------
-----------------
Who Is Jimmy Vegas?
-----------------
Jimmy Vegas is one of the top YouTube tutorial developers. In depth Unity Tutorials teaching you how to make a game in unity 3d! My unity tutorials include development, programming in C#, coding logic and more. For beginners, it's easy how to learn unity with tips and tricks you can make a game for FREE. I provide FREE assets for you to use and learn.

Start your game development career today, for free. #JIMMYVEGAS #UnityTutorial #UnityTutorialForBeginners
Рекомендации по теме
Комментарии
Автор

Amazing. Amazing. Amazing. So simple yet exactly what I needed. Awesome tutorial. Keep doing what you're doing man

lucafrancis
Автор

Thank You bro I hope theres more tutorials

nyanchangaming
Автор

Thank you so much for this! Subscribed!

zartl
Автор

This is exactly what I needed thanks bro!! Subscribed!

nullptryt
Автор

Hey Jimmy, dude your tutorials are a godsend, please keep them coming. Even though I'm proficient in C#, I'm learning so many new methods and ways of observing and tackling all the little tasks
I set myself, while I'm creating my Open World Fantasy RPG, which brings me to my request. If at all possible, could you create another mini tutorial involving a money system.

A while back, I was working through your "How to Make a Game For Free (51 Video) Tutorial" as a sort of baseline and Ep. #7 with the coins got me thinking, would there be a way, if for example each of those coins was a different colour and as your picked them up, they were each calculated as a different denomination. (Red: $5, Green: $10 and so on) and have a overall calculation of the total money accrued as well as calculating the individual denominations.

Could that be done? In my head as I'm thinking about it seems rather complex, so I'm hoping you can find a way to simply the method.

davidfattore
Автор

ok so this helped massively and allowed me to progress in my game making, great video btw. how would i go about stopping the models spawning in the same place as it is random so that is a possibility?

bake
Автор

I am new to this and dont understand Coroutine and IEnumerator. Whenever i try to use them i get an error, and when i dont the script starts making clones of clones. Can you help please?

piguy
Автор

hi great vid

is it possible to duplicate the spawn object?
also the enemy spawns in the same location when i press play is there anyway of fixing it?

many thank
keep up the great content

zubbag
Автор

If you wanted a random number of enemies, could you also enemy count random range?

Also, what if you're attempting to put in more than one enemy type? Would a separate script for each be best, or perhaps just additional ones in the original script?

wrayth
Автор

How do you limit the amount of enemies spawned as well as how to delete them after they leave the screen

trixterxzgaming
Автор

How do you make it to where they only spawn when a player come into a certain distance of them?

Daviejones
Автор

Sir make a video about ..
How to make an enemy, Which can react to sound.
Like if he hears the footsteps than follow the player.
Thank you.

arkajyotiadhikary
Автор

Hi! Great video, this has helped me so much. Subscribed!! How would I edit the code to have the new enemies face another direction, rotating them by 90 degrees?

philyorke-robinson
Автор

This helped but for some reason they are spawning on a grid is there any way to fix this

littlermganimations
Автор

How can I repeat this for every round, so that the enemy count increases?

josho
Автор

Hey, Is there any way that i can multiply the " Instantiate(enemy, new Vector3(xPos, 2, zPos), Quaternion.identity); " code by the number of waves?
I cant really figure it out.
I managed to make the enemies disappear on colission with my gun and the code repeats itself once the "enemycount == 0".
The wave also increased by 1 when "enemycount" reaches "0"
Thanks in Advance

takuya
Автор

I’m having an issue. using your example if I were to kill one of the 10 enemies spawned in the enemy count isn’t going down and therefore aren’t spawning new enemies. What do you think I’m doing wrong?

JackaldudeVR
Автор

Can I somehow make the enemies spawn at a local position? My rooms are randomly generated.

MrPablosek
Автор

Hey, Jimmy. Great videos. I was wondering if you could change the value of spawning enemies while in game like a Call of duty zombie round system. Each round it spawns more zombies. Do you have any suggestions for that? I could make dozens of Ienumerators for each round but that wouldn't be really praticial, would it?

mehmetkans
Автор

How do i make the enemies respawn or how do i recall this code when the enemies die.
I want the enemies to continuesly respawn every 10s using the method used in this video.

rhon