No video

Add Killer Enemies to Your Game - 2D Top Down Shooter - Unity Tutorial

  Рет қаралды 17,905

Muddy Wolf

Muddy Wolf

Күн бұрын

Learn how to add KILLER enemies to your Top Down 2D Game! We use the power of the Unity Engine to add evil 2D enemies that will hunt you down!
Previous Tutorial: • 2D Shooting in Unity -...
Next Tutorial: • Enemy Infinite Spawner... (Enemy Spawner!)
// JOIN THE COMMUNITY DISCORD!
/ discord
// PLAY MY DAMN GAME ALREADY?
play.google.co...
// WEB DEV CHANNEL
/ tylerpotts

Пікірлер: 39
@MuddyWolf
@MuddyWolf Жыл бұрын
Access the FULL source code on my Patreon here: www.patreon.com/posts/2d-shooter-code-85313134
@hardyhu9999
@hardyhu9999 Жыл бұрын
can you add like enemy Health bar? so they don't die instintly + when you kill them blood particles will shower you? if you could that will be great . just a note your videos are amazing!
@tanooki6457
@tanooki6457 Жыл бұрын
is anyone having an issue where the enemy isn't destroying the player when it collides with it? (Fixed - make sure that the player has been tagged as a player)
@Hamza-xj6wj
@Hamza-xj6wj 10 ай бұрын
how do you do that ?
@adhoahsgamingdnd9617
@adhoahsgamingdnd9617 Жыл бұрын
I enjoyed this video a lot, you explained movement pretty well, I'm searching for how to make enemies avoid obstacles while also chasing the player, I'm pretty stuck on that. Do you have any suggestions?
@MuddyWolf
@MuddyWolf Жыл бұрын
Ooo you can use A* pathfinding! If you KZbin it you'll find loads of tutorials but I recommend brackeys tutorial!
@derburgerr7416
@derburgerr7416 6 ай бұрын
great video helped me a lot
@jetsi604
@jetsi604 Жыл бұрын
Amazing video! helped me so much, Thanks!
@MuddyWolf
@MuddyWolf Жыл бұрын
Awesome! I'm happy it helped, Jetsi!
@whataname6309
@whataname6309 Жыл бұрын
Thank you very much! On to the next one.
@itsdonix
@itsdonix Жыл бұрын
Is there anyway to make the zombies take more shots to kill? very good tutorial btw keep it up. would love more to this tutorial serie.
@jankystreams3337
@jankystreams3337 Жыл бұрын
I did every. single. bit of code you did, EXACTLY, replaying the video at least 10 times. My enemy still isn't moving. Please help me figure out what's going on.
@ByteKnite
@ByteKnite Жыл бұрын
Do you have a fix yet? I’m experiencing the same issue and I’m on a time restraint with this being a school project. Please share if you do have a fix
@jankystreams3337
@jankystreams3337 Жыл бұрын
@@ByteKnite I don’t sadly. I just kinda abandoned my project
@ByteKnite
@ByteKnite Жыл бұрын
@@jankystreams3337 I just deleted and retyped the code and it just started working. Idk what I changed but it started working
@jankystreams3337
@jankystreams3337 Жыл бұрын
@@ByteKnite That’s weird. Thanks.
@monio_
@monio_ Жыл бұрын
When the enemy touches my player, the player starts spinning forever.
@yahyabzl1112
@yahyabzl1112 3 ай бұрын
Just doa check collision when the enemy touches the player you restart the scene: First at the top of the script do (using unityengine.scenemanagment) Then, write(Oncollisionenter(collision col): If(col.gameobject.tag == "enemy" Scenemanager.loadscene("You put her the index of the level")
@classysoda
@classysoda Жыл бұрын
can you help I have a problem on the 'Vector' could not be found
@ketsueki血液
@ketsueki血液 4 ай бұрын
My player spawns on top of the enemy then cant move, someone pls help
@applesauce8173
@applesauce8173 3 ай бұрын
Did you fix it.
@SmallToeSoap
@SmallToeSoap Жыл бұрын
this helps a lot thanks
@mitkorx3270
@mitkorx3270 Жыл бұрын
Very good video you are great
@MuddyWolf
@MuddyWolf Жыл бұрын
Thank you so much 😀
@classysoda
@classysoda Жыл бұрын
Hello can you help me I have some problem about the enemy
@lobtig7035
@lobtig7035 Жыл бұрын
How is the word "other" italicized?
@edwarbladimir317
@edwarbladimir317 Жыл бұрын
make him die from many bullets, that is to say: that the enemy has invisible life for the player but that he dies from 2 or 3 shots
@MuddyWolf
@MuddyWolf Жыл бұрын
Nice idea! We could add a life count and each bullet will take one life away until they die!
@edwarbladimir317
@edwarbladimir317 Жыл бұрын
@@MuddyWolf 👍
@zer05tar
@zer05tar Жыл бұрын
@@MuddyWolf How about a boss where it has an HP and armor bar in which you have to get to zero before the boss starts taking health damage? Too much? >.
@Dr_Warr
@Dr_Warr Жыл бұрын
Yay tysm!
@MuddyWolf
@MuddyWolf Жыл бұрын
You're welcome! :)
@swetiDevy
@swetiDevy Жыл бұрын
9:21
@umer11q1
@umer11q1 Жыл бұрын
plz give code for free
@MuddyWolf
@MuddyWolf Жыл бұрын
You can copy and use the code from the video for free, however if you don't want to copy it out then you can get it via my Patreon by subscribing as a "Beta Wolf" - this is to support the channel and the tutorials I make for free.
@Rowland4825
@Rowland4825 Жыл бұрын
unfortunately there is something wrong with how i did it. it says "Assets\Enemy.cs(31,92): ; expected" Any help would be amazing. The my code is in the comment. I tried running it through spell check but I couldn't find anything. I also checked the tags and that not it ether. I tested it at 9:33 using System.Collections; using System.Collections.Generic; using UnityEngine; public class Enemy : MonoBehavior { public Transform target; public float speed = 3f; public float rotateSpeed = 0.0025f; private Rigidbody2D rd; private void Start () { rb = GetComponent < Rigidbody>2D(); } private void Update () { if (!target) { GetTarget(); } else { RotateTowardsTarget(); } } private void FixedUpdate () { // move foward } private void RotateTowardsTarget () { Vector2 targetDirection = target.position - transform.position; float angle = Mathf.Atan2(targetDirection.y, targetDirection.x) * Mathf.Rad2Deg - 90f; //the - 90f is because the triangle is naturally facing up. This will make it face the player. Quaternion q = Quaternion.Euler(new Vector3(0, 0, angle)); transform.localRotation = Quaternion.Slerp(transform.localRotation, q, rotateSpeed) } private void GetTarget () { target = GameObject.FindGameObjectWithTag("Player").transform; } }
@airconditioningac
@airconditioningac Жыл бұрын
as the error says, you're missing a ; on line 31 col 92, transform.localRotation = Quaternion.Slerp(transform.localRotation, q, rotateSpeed);
@bullet-d1616
@bullet-d1616 10 ай бұрын
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Enemigo : MonoBehaviour{ public Transform target; public float speed = 3f; public float rotateSpeed = 0.0025f; private Rigidbody2D rb; private void Start(){ rb = GetComponent(); } private void Update() { if (!target) { GetTarget(); } else { RotateTowardsTarget(); } } private void FixedUpdate() { //Move Forwards } private void RotateTowardsTarget() { Vector2 targetDirection = target.position - transform.position; float angle = Mathf.Atan2(targetDirection.y, targetDirection.x) * Mathf.Rad2Deg - 90f; Quaternion q = Quaternion.Euler(new Vector3(0, 0, angle)); transform.localRotation = Quaternion.Slerp(transform.localRotation, q, rotateSpeed); } private void GetTarget () { target = GameObject.FindGameObjectWithTag("Player").transform; } } Ahí tienes la versión sin errores xd habían cosas que fallaste que no falle pero yo falle en un } xddd, igual gracias por compartir me sirvió.
Enemy Infinite Spawner - 2D Top Down Shooter - Unity Tutorial
11:25
5 Minute Top Down Shooter Unity Tutorial
5:01
BMo
Рет қаралды 71 М.
Dad Makes Daughter Clean Up Spilled Chips #shorts
00:16
Fabiosa Stories
Рет қаралды 6 МЛН
Unveiling my winning secret to defeating Maxim!😎| Free Fire Official
00:14
Garena Free Fire Global
Рет қаралды 16 МЛН
Throwing Swords From My Blue Cybertruck
00:32
Mini Katana
Рет қаралды 11 МЛН
هذه الحلوى قد تقتلني 😱🍬
00:22
Cool Tool SHORTS Arabic
Рет қаралды 90 МЛН
The Trick I Used to Make Combat Fun! | Devlog
8:12
Game Endeavor
Рет қаралды 1,6 МЛН
Your First Game In Godot 4 Final Part - Exporting To Windows
4:28
How to Spawn Enemies (Unity Tutorial | 2D Top Down Shooter)
5:50
SHOOTING/FOLLOW/RETREAT ENEMY AI WITH UNITY AND C# - EASY TUTORIAL
12:55
2D Top Down Shooting POINT & CLICK Unity Tutorial
13:55
Creating SMART enemies from scratch! | Devlog
5:40
Challacade
Рет қаралды 318 М.
Making a TOP-DOWN SHOOTER in 10 minutes VS 1 hour VS 1 day!
8:34
Blackthornprod
Рет қаралды 144 М.
2D Melee in Unity Tutorial
19:46
Muddy Wolf
Рет қаралды 16 М.
Dad Makes Daughter Clean Up Spilled Chips #shorts
00:16
Fabiosa Stories
Рет қаралды 6 МЛН