Enemy AGRO AI System in Unity For Beginners ( 2D Game Dev Tutorial )

Поделиться
HTML-код
  • Опубликовано: 19 дек 2024

Комментарии • 157

  • @LostRelicGames
    @LostRelicGames  5 лет назад +13

    Part 2 here, Enemy line of sight detection with Raycast!
    ruclips.net/video/2VX8uD_xUlM/видео.html

    • @JimmyKadesch
      @JimmyKadesch 5 лет назад

      great tutorials dude! you've been a huge help to me! thanks for making these vids!!

  • @vincentdcn
    @vincentdcn 2 года назад

    In the immortal words of Mr. Burns... "....Excellent."

  • @TB3hnz
    @TB3hnz 4 года назад +7

    Not kidding, this was the video I needed! I could NOT figure out how to get my bad guy to flip by the y axis, and after applying your solution, IT FREAKING WORKED! I was running around screaming at 1:20 am!
    You are a gift from God!

    • @LostRelicGames
      @LostRelicGames  4 года назад +3

      Hahaha! seeing your comment is a big driving force for me to make these tutorials! Thanks for sharing your excitement :)

  • @alejandrocuello849
    @alejandrocuello849 5 лет назад +37

    John wick , like Game Developer is the best.

  • @manhalyousif2311
    @manhalyousif2311 4 года назад +19

    I was looking for a way to make the enemy chase me all the day on youtube and you're are the only one who actually did what I wanted to do, so thank you for real

  • @tristanradeka2274
    @tristanradeka2274 4 месяца назад

    I love the characters, they're super cute. You could actually make a game with characters like that intentionally

  • @xDTHECHEMISTx
    @xDTHECHEMISTx 3 года назад

    This tutorial worked flawlessly for me. i have 3 different enemy AI types now

  • @heyyounotyouyou3761
    @heyyounotyouyou3761 4 года назад +2

    You are amazing
    Just keep making videos and it will take time to make enough subscribers
    But never think of stopping this channel

  • @Itsysss
    @Itsysss 4 года назад +2

    Ayy bro, you are the first person to actually explain every line of coding, best developer! 😀

    • @knt5429
      @knt5429 4 года назад

      He definitely isnt, but yeah hes a great dev

    • @Itsysss
      @Itsysss 4 года назад

      @@knt5429 true

  • @tando4563
    @tando4563 2 года назад

    this is best tutorial i have ever seen, thanks a lot. 👌

  • @Ivke-i6f
    @Ivke-i6f 4 года назад +1

    Omg, tnx you really helped me alot, also you are so funny in videos I subbed and liked the video. Im new to unity so your tutorials are helping me ALOT. Love you and your vids and i wanna see more. Bye!! ;D

  • @jaskarnjass8548
    @jaskarnjass8548 5 лет назад +2

    Awesome tutorial thank you so much for this. Please make a tutorial on enemy AI attack or shooting.

  • @mattrav8127
    @mattrav8127 2 года назад +1

    For issues with enemy vibrating back and forth, while player is above, I added this to ChasePlayer:
    if (transform.position.x - player.position.x = 0f)
    {
    StopChasingPlayer();
    }

  • @VikingDragon01
    @VikingDragon01 3 года назад

    Thank you so much for this awesome tutorial! This helps immensely!

  • @Jeea84
    @Jeea84 2 года назад +1

    John, please do a full fledged enemy controller, with melee, ranged, flying options.... including the animations. You must have done it for your game.
    You're so easy to follow, I want to learn from you.
    Thanks.

  • @SunaKhei93
    @SunaKhei93 4 года назад +5

    Hey, man. Your tutorials are so underrated. I learned a lot from this and I was able to incorporate a few things on my own using your code as a base. Thank you for sharing your knowledge!

    • @LostRelicGames
      @LostRelicGames  4 года назад +2

      Hey Abraham, my pleasure. I'm thrilled to hear it was able to help you!

    • @SunaKhei93
      @SunaKhei93 4 года назад

      @@LostRelicGames I subscribed to your channel. 💪💪💪 Looking forward to your new videos

  • @cyclo_studios4229
    @cyclo_studios4229 3 года назад

    Thanks keanu love your tutorials

  • @joecommoner669
    @joecommoner669 4 года назад +2

    Great tutorial! I found a hilarious bug that happens if you jump on top of the enemy and the enemy's speed is really high, the sprite started flickering left to right and slowly phased through the ground

    • @HadiNauf
      @HadiNauf 3 года назад

      yea it happen to me too, how to fix that ?

  • @christopherortiz7202
    @christopherortiz7202 5 лет назад +2

    I just implemented this and it works like a charm. As always, thank you for sharing your knowledge!

  • @HeDidWhatNow
    @HeDidWhatNow 2 года назад

    I'd really like a version of this for 3d rigidbodies. Great video though!

  • @In.Gy.
    @In.Gy. 4 года назад +8

    I'm getting this really weird effect where my enemy sprite keeps flipping back and forth wildly when I'm directly on top of him :c

    • @TheBloodhound1861
      @TheBloodhound1861 4 года назад

      same problem here

    • @In.Gy.
      @In.Gy. 4 года назад +5

      WhiteNoise Hey, so I managed to fix it. What I did was create a variable to denote a minimum aggro range, and a boolean to let the enemy know that if the player is less than a certain distance away, it should not attempt to follow.

    • @TheBloodhound1861
      @TheBloodhound1861 4 года назад

      @@In.Gy. nice
      I'll try that
      Thanks:)

    • @totallyrandompersob1664
      @totallyrandompersob1664 4 года назад +1

      probably happens because its at your position (at least to humans) but the enemy wants to be pixel perfect and tries to get to the exact x position but always overshoot by a few pixels and keeps going back and fourth. Just a guess

  • @xil2331
    @xil2331 4 года назад +1

    Awesome work, keep it up.

  • @supertenchoo4271
    @supertenchoo4271 2 года назад +1

    Great tutorial

  • @miguelmonreal.8874
    @miguelmonreal.8874 4 года назад +2

    Hello, great tutorial, i learned a lot. i'm sure it's a simple few lines but how would you make the enemy follow along the y axis also?

  • @orionisaacs9864
    @orionisaacs9864 2 года назад

    Great video, Do you have a video making a basic finite state machine for enemy AI. Thank you.

  • @snaik5947
    @snaik5947 2 года назад

    Thanks, nice tutorial.

  • @infernomakegames233
    @infernomakegames233 3 года назад

    10:00 .... what will be the Y if enemy also have vertical movement..

    • @MikeCedillos
      @MikeCedillos 3 года назад +1

      using System;
      using System.Collections;
      using System.Collections.Generic;
      using UnityEngine;
      public class Enemy : MonoBehaviour
      {
      [SerializeField]
      public Transform player;
      private Rigidbody2D rb;
      private Vector2 movement;
      [SerializeField]
      public float moveSpeed = 5f;
      [SerializeField]
      float agroRange;

      void Start()
      {
      rb = this.GetComponent();

      }

      void Update()
      {
      float distToPlayer = Vector2.Distance(transform.position, player.position);
      Vector3 direction = player.position - transform.position;
      direction.Normalize();
      movement = direction;
      if(distToPlayer < agroRange)
      {
      moveCharacter(movement);
      }
      else
      {
      StopChasingPlayer();
      }
      }
      private void StopChasingPlayer()
      {
      rb.velocity = new Vector2(0, 0);
      }
      void moveCharacter(Vector2 direction)
      {
      rb.MovePosition((Vector2)transform.position + (direction * moveSpeed * Time.deltaTime));
      }
      }

  • @Abdul-pe5rf
    @Abdul-pe5rf 4 года назад

    Best tutorial please make more I love it

  • @stealthyshiroean
    @stealthyshiroean 3 года назад

    These guides have been so helpful. Usually I start searching on RUclips and for something that I want to do in my game and I come across someone like Brackeys. Now, Brackeys is good and all and I have learned from them as well, but sometimes I think they're just a bit too extra. Then I do a bit more digging and come across your video and it's exactly what I need. Or you present a different way of doing something that helps me think through the problem that I'm having. Great stuff, man. Definitely just going to start consulting your channel first before I do a general RUclips search.

    • @LostRelicGames
      @LostRelicGames  3 года назад +1

      I'm really happy to hear that! I think carefully about how I can best communicate the information before making these tutorials, so I'm glad the outcome is appreciated, all the best to you!

    • @stealthyshiroean
      @stealthyshiroean 3 года назад

      @@LostRelicGames To you as well, man! I've been watching your Blood and Mead videos recently and have been eagerly awaiting to play it myself sometime. Just great content all around!

  • @hhcdghjjgsdrt235
    @hhcdghjjgsdrt235 3 года назад

    Most underrated unity tutorial channel. Its more simple than triggerenter,stay and exit.

  • @jeffaction9968
    @jeffaction9968 2 года назад

    Thanks for this video. How can I make it so that the enemy stops when in attacking range as well as when it is not in aggro range. Because right now he is still running towards the player and when I leave the aggro range it will then do the animation for attacking

    • @barkmober
      @barkmober 2 года назад

      mate can u pls give me the code?

  • @aaush_
    @aaush_ 4 года назад +1

    dude you're a lifesaver

  • @GokdenizCetin
    @GokdenizCetin 5 лет назад +1

    Great tutorial! I am waiting your next tutorials as well.

  • @plop2453
    @plop2453 3 года назад +1

    Great video! But whenever I get directly above or below the enemy, it starts flipping back and forth really fast because it can’t decide which direction to go. Any ideas?

    • @Kelgorr
      @Kelgorr 2 года назад +2

      This is old but just in case anyone else comes to the comments to find the answer for this, here was my solution:
      if (transform.position.x + -.3f > target.position.x)
      {
      enemy.enemyMovement.MoveLeft();
      }
      else if (transform.position.x + .3f < target.position.x)
      {
      enemy.enemyMovement.MoveRight();
      }
      else
      {
      enemy.enemyMovement.Idle();
      return;
      }
      As soon as the enemy was within the .3f distance left and right it would instead call the idle function I'd made in my movement script. Makes the enemy follow underneath you without spinning.

  • @totallyrandompersob1664
    @totallyrandompersob1664 4 года назад +1

    If you have your scale higher than 1 on your enemy, and then it calls the transform.localScale = new Vector2(1, 1); my enemy just turns small. I think that's the problem but I dont know how to fix it. Could I change the size of my enemy without doing it in the transform? Also it looks the opposite way of where the player is once it finds it. (still chases it though, just backwards and small).

    • @fabiol.4329
      @fabiol.4329 4 года назад

      Try instead transform.eulerAngles = new Vector2(0,0) in movespeed
      in -movespeed transform.eulerAngles = new Vector2(0,180)

  • @MikeCedillos
    @MikeCedillos 3 года назад +3

    here is a script for up-down games you might have t change it a little for you're game Mabey using System;
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    public class Enemy : MonoBehaviour
    {
    [SerializeField]
    public Transform player;
    private Rigidbody2D rb;
    private Vector2 movement;
    [SerializeField]
    public float moveSpeed = 5f;
    [SerializeField]
    float agroRange;

    void Start()
    {
    rb = this.GetComponent();

    }

    void Update()
    {
    float distToPlayer = Vector2.Distance(transform.position, player.position);
    Vector3 direction = player.position - transform.position;
    direction.Normalize();
    movement = direction;
    if(distToPlayer < agroRange)
    {
    moveCharacter(movement);
    }
    else
    {
    StopChasingPlayer();
    }
    }
    private void StopChasingPlayer()
    {
    rb.velocity = new Vector2(0, 0);
    }
    void moveCharacter(Vector2 direction)
    {
    rb.MovePosition((Vector2)transform.position + (direction * moveSpeed * Time.deltaTime));
    }
    }

  • @senjos
    @senjos 5 лет назад +2

    This is so good explained!! Thank you!! You're videos ar always so helpful!!
    do you know a good way to make a player aim in a 2d side plattformer game? If yes, is there a difference between pixel character animated frame by frame and a character bone rigged? Or what must be done to make a character aim with a gun, pistol or bow?

    • @LostRelicGames
      @LostRelicGames  5 лет назад

      Hi Josef 2d platformer aiming can be done in a few ways. One way would be to make the arm that holds the pistol a separate component that rotates based on input. I may make a video about it for you. Also n swing by the discord if you want to talk in more detail! :)

  • @HEADEPIC
    @HEADEPIC 4 года назад +1

    It would be great if you teach how you created those two characters and you animated them. Thanks

  • @JXHNDRX
    @JXHNDRX 4 года назад +1

    Can you help?
    I set it that my enemy would attack the player, but when the transform is destroyed it crashes. When I use prefabs it doesnt do anything.. the enemy does not even move...

    • @LostRelicGames
      @LostRelicGames  4 года назад +1

      Hey. The prefab will need a fresh player reference when it is instantiated. And for the other issue; when you destroy a game object the script also gets destroyed with it. Adding some check to see if the object is still alive can solve this. Hopefully this information helps!

    • @JXHNDRX
      @JXHNDRX 4 года назад

      @@LostRelicGames Hey. I'm relatively new to this only doing it for my end of term project. I don't understand the first sentence im sorry.
      I added an if statement f player != null etc in the update() and it works but still, the transform is missing. Is there a way to automatically assign the transform? sorry if it's a dumb question. Thanks anyway

  • @rop3443
    @rop3443 4 года назад

    this was a great video it helped me

  • @ItsJoeyG
    @ItsJoeyG 4 года назад +1

    Is there any way to increase the gravity?? My enemy just keeps floating until it hits the ground when it walks off the stairs

    • @LostRelicGames
      @LostRelicGames  4 года назад

      under the rigidbody settings, try increasing the gravity scale

    • @cercizbatha9034
      @cercizbatha9034 4 года назад

      @@LostRelicGames doesn't work my enemy just floats through the floor both have box colliders and are not set to on trigger can you help?

    • @golflefleur2767
      @golflefleur2767 3 года назад

      @@LostRelicGames it still floats

  • @OpKingDimond
    @OpKingDimond 4 года назад

    15:26 when my sprite flips it changes size becoming huge, how do I fix this?

    • @tainycassu1699
      @tainycassu1699 4 года назад

      the problem is in the localscale, depending on the size that you set for the sprite of the enemy, it most likely changes size because the default avatar size is set to a certain thing and the avatar you are using to another, when on the local scale make sure that you set the numbers to the size of the avatar you are using, let´s say you set you enemy to be x 5 y 5, then check it is the local scale to have the same size

  • @Brick69
    @Brick69 3 года назад +1

    Hemos this doesnt seem to work on prefabs

  • @vakous2415
    @vakous2415 2 года назад

    good man cool video thank you

  • @toufikboulahtari6711
    @toufikboulahtari6711 5 лет назад +1

    Nice tutorial man keep it up i have a question like do you use those methods for your game to? Like all those tutorials you keep posting? And do you use a State Machine for some things or not? Again much love for those tutorial hope you will get a bigger platform on YT.
    Ps
    Do you also help people with their needs if they are stuck on something?

    • @LostRelicGames
      @LostRelicGames  5 лет назад +1

      Hey! I use many of the techniques in my own game 100%, though as my game has grown, I have often changed approaches. My own game has vastly more robust structue; Data models, controllers and data processed from json files. I plan to slowly move into these more advanced topics in the tutorials.
      Regarding state machines, I have my own custom state machines which manage both game flow and also character animation states! :) thanks for the comment!

    • @LostRelicGames
      @LostRelicGames  5 лет назад +1

      Oh and come by the discord! I personally help people there. We are about 150 game developers there helping each other. The link is in the channel banner

  • @skamzababy6017
    @skamzababy6017 4 года назад

    thank you for this tutuorial

  • @MrMoney-zu6su
    @MrMoney-zu6su 3 года назад

    I have a problem, when I entered "transform.localScale = new Vector2 (-1, 1);" when the enemy rotates his scale becomes huge

    • @LostRelicGames
      @LostRelicGames  3 года назад

      Hi, this would suggest your original scale was less than 1. It's typically good to work in a 1:1 scale, but as a work around you can store your base starting scale in a Vector2 variable at the top of your class, (Vector2 baseScale = transform.localScale), and use that instead of (-1, 1), which would then look like (-baseScale.x, baseScale.y).

    • @MrMoney-zu6su
      @MrMoney-zu6su 3 года назад +1

      @@LostRelicGames thank you very much! :)

    • @MrMoney-zu6su
      @MrMoney-zu6su 3 года назад

      @@LostRelicGames Ah another question, I did not understand what AGRO means?

  • @lastone2841
    @lastone2841 2 года назад

    Great video and teacher I'm having this issue the enemy's follow me but when I jump on them they just fall through the floor , and when i jump off a platform they just keep following me floating. Just starting to get back into game dev. :)

  • @hentoebill1506
    @hentoebill1506 3 года назад

    how can i make it go on the y axis as well

  • @CodingKricket
    @CodingKricket 3 года назад

    Great tutorial! So my plan was to set my enemy active when its in the distance and disable it when its not. I did the if statments and inside I put gameObject.SetActive(true); if disttoplayer

    • @CodingKricket
      @CodingKricket 3 года назад

      Ok this is what I did, I made the script go on an empty object and made a public variable for my enemy, then I said enemy.gameObject.SetActive(true & false dedpending on if its in the if or else) But I have multiple enemies in my script and want all of them to be affected and I don't want to add the script 100 times to my empty,.

  • @ZiaurRahmanAdvocate
    @ZiaurRahmanAdvocate 5 лет назад +1

    Thanks for the video..

  • @gececiyim87
    @gececiyim87 2 года назад

    hello again my friend,
    The enemy character is following, but while falling vertically, it goes down slowly while on top of the player.
    I want it to fall on me, what are we going to do?
    thank you.
    ***If I couldn't explain it fully, I can send the screenshot as an e-mail.

  • @NanoValorant
    @NanoValorant 4 года назад

    Wouldn't the enemy stop chasing player if the player run away? Because the distance is already bigger than the agroRange value?

  • @aykens3197
    @aykens3197 3 года назад

    hello anyone have some problem like mine did? my enemy keep spinning like crazy when i jump over it to the left but it's normal when i jump over it to the right. i've followed the tutorial precisely thou. really strange

  • @tainycassu1699
    @tainycassu1699 4 года назад

    i don´t know what i did but my enemy doesn´t appear in the display, he is invisible, i don´t know if i messed with the ordering layers or what happened

    • @jaypost6202
      @jaypost6202 4 года назад

      I had that happen as well after I already had it working. When I exited the project after saving and loaded it back up a couple hours later, something wasn't working right. Got really frustrated, couldn't the problem/solution. Loaded it back up again today, first thing I notice was that the position for the Object that was invisible in the display was for some reason set to Z: -315.82728....Don't know how or why that happened, but as soon as I changed that to a Z value less than the Z value of my Main Camera, it was fine. So that might be what happened. THe stupid thing is, I checked the positions and layers like 30 times the previous day, but ah well.

    • @tainycassu1699
      @tainycassu1699 4 года назад

      @@jaypost6202 Hey thanks, i actually managed to fix it a while ago and i had the same problem, i still don't know what happened but eh, unity gets weird sometimes i suppose, but thank you, really!

  • @cercizbatha9034
    @cercizbatha9034 4 года назад +1

    Can you help my enemy just gets really small

    • @stefanventer575
      @stefanventer575 4 года назад

      Instead of using " new Vector2( 1 , 1 ) " try using " new Vector2(3, 3) " . It depends on the initial scale values of your sprite.

    • @cercizbatha9034
      @cercizbatha9034 4 года назад +2

      @@stefanventer575 yeah I was dumb I learned alot thanks thou

  • @adambouches7396
    @adambouches7396 3 года назад

    how would you do this with the y axis

  • @cercizbatha9034
    @cercizbatha9034 4 года назад

    Can you guys help enemy just floats through the floor both have box colliders and their not set on trigger.Help!!

    • @dummy6624
      @dummy6624 4 года назад

      This Is My Other Acount For Real I Was Just Trippin What Happened Was I Downloaded A Asset Pack And it fuked up my layers So All I Had To Do Was Change The Layer To Ground Also Great Video My G, [:

  • @oveysazimi5516
    @oveysazimi5516 2 года назад

    Damn Son Where'd ya find this

  • @markvandenberg8548
    @markvandenberg8548 4 года назад

    I keep getting the popup Rigidbody2d does not contain a definition for Velocity. I dont understand why, can somebody help me here?

  • @sudeepadhikari4513
    @sudeepadhikari4513 4 года назад

    I get error on this code distanceToPlayer = Vector2.Distance(transform.position - player.position); //Vector2 is an ambiguous reference between 'System.Numerics.Vector2' and 'UnityEngine.Vector2'. How to fix this?

    • @LostRelicGames
      @LostRelicGames  4 года назад

      You may have accidently imported the numberics library at the top of your file.

  • @reyshakquit
    @reyshakquit 4 года назад

    Thank you John Wick!!!

  • @Haze_E1
    @Haze_E1 5 лет назад

    what happened to videos on your grid system ?

  • @knt5429
    @knt5429 4 года назад

    It doesnt recognize Player in the current context, can you help me fix this?

    • @knt5429
      @knt5429 4 года назад

      Ok so the way I "simply" fixed this is, refrence the rb in your public class, then in start, player = GameObject.Find("Player").GetComponent(); please let me know if there is a better way of doing this.

    • @knt5429
      @knt5429 4 года назад

      Ok so I have a new issue, my enemy is patrolling, yet as it moves back and forth the distance print changes briefly and then stops, not showing the constant dis between the two.

    • @knt5429
      @knt5429 4 года назад

      Update! I did literally nothing and the print dis problem is gone.

  • @shibanobi69
    @shibanobi69 4 года назад

    how can someone hate this tutorial???

  • @bakiprogamer6595
    @bakiprogamer6595 3 года назад +1

    thanks!

  • @fraan9810
    @fraan9810 3 года назад

    Tnx so mush good video

  • @noniceq2096
    @noniceq2096 3 года назад

    when i do prefab the enemy forget about player (None Transform)

  • @justinchap8732
    @justinchap8732 3 года назад

    INSANE thks you !!

  • @phonike
    @phonike 3 года назад

    Good Tips

  • @Techn0forlife
    @Techn0forlife 4 года назад

    The moment when I'm following along with this tutorial and my enemy stop chasing my player when I get outside of the agro range even though I haven't written any code for StopChasingPlayer() XD

  • @batuyilman2533
    @batuyilman2533 4 года назад

    Thank you man

  • @confusedsnail6457
    @confusedsnail6457 4 года назад +1

    my enemy shrinks when he is chasing me

  • @memesworld8870
    @memesworld8870 4 года назад

    I know this comment is a bit late but if anyone can help plz do it..so the problem is my enemy squeezes when the player enters the range.other than tht everything works fine

  • @MLaurenavicius
    @MLaurenavicius 3 года назад

    That's awesome!

  • @g4b7uz
    @g4b7uz 3 года назад

    Thanks!

  • @davidbarnaba7229
    @davidbarnaba7229 3 года назад

    this is the third video I watch to code a damn aggro, nothing worked, the enemy is standing still doing nothing. What can it be?

  • @saptarshisamanta6856
    @saptarshisamanta6856 4 года назад

    A very useful video it helped me make my aggro script for the enemy to chase my player
    attaching the script of the look at player part please let me know what you think
    //turn towards player and face player till out of range
    if (Vector3.Distance(_transform.position, transform.position) < 20f)
    {
    transform.localScale = new Vector2(-1, 1);
    }
    if (transform.position.x < _transform.position.x)
    {
    transform.localScale = new Vector2(1, 1);
    }

  • @martin-gaming
    @martin-gaming 4 года назад +1

    Thanks

  • @JuanFranco-mq7js
    @JuanFranco-mq7js 3 года назад

    the code works perfect, but the enemy falls so slow any hint?

    • @RandomDev77
      @RandomDev77 Год назад

      It is a bit late but just change Vector2(moveSpeed, 0) to (moveSpeed, rb2D.velocity.y)

    • @JuanFranco-mq7js
      @JuanFranco-mq7js Год назад

      @@RandomDev77 Yes, I already noticed, but I hope it helps someone else, thanks

  • @gececiyim87
    @gececiyim87 2 года назад

    thanks bro !

  • @gamewood7800
    @gamewood7800 3 года назад

    I love You, you are amazing

  • @Odaznarak
    @Odaznarak 4 года назад

    It is working. The problem is when the enemy is falling and following the player it looks like flying.

    • @Odaznarak
      @Odaznarak 4 года назад +1

      I fixed this. I just add raycast that check if the enemy is on the ground and if it isn't then his vertical velocity will be on negative value.

  • @BluePhantomStudio
    @BluePhantomStudio 4 года назад

    Butter than Brockey

  • @Rex-nk1zj
    @Rex-nk1zj 4 года назад

    Thanks thanks thanks thanks thanks thanks thanks thanks thanks

  • @yassoubouajila5412
    @yassoubouajila5412 4 года назад

    Underrated

  • @jamescraft5300
    @jamescraft5300 4 года назад

    where is the code

  • @mcdocs2114
    @mcdocs2114 3 года назад

    you remind me of john wick

  • @elijahlittrell7241
    @elijahlittrell7241 3 года назад +1

    for a cleaner script. "don't" serialize the variables, and instead start each with "public" (including the rigidbody2d) and instead of the GetComponent with the rigidbody2d (in the start function), just add the same way you did with the player transform. hope this helps.

    • @LostRelicGames
      @LostRelicGames  3 года назад +1

      I respectfully disagree with everything you have just proposed. Making things unessessary public pollutes the scope. There is also no issue with retreiving components in the start up functions. It's how they were designed to be used.

    • @elijahlittrell7241
      @elijahlittrell7241 3 года назад

      uhh...
      okay

    • @snarpking
      @snarpking 3 года назад

      @@LostRelicGames I'm confused what exactly making things serialized is, what's the difference between it and public?

  • @NanoValorant
    @NanoValorant 4 года назад

    12:10 Get the f....
    lmaooo

  • @IBeToxic
    @IBeToxic 2 года назад +1

    TURNNNN ON DARK MODE PLEASEE

  • @hfy5191
    @hfy5191 3 года назад

    11:50 :D

  • @flyssa8211
    @flyssa8211 5 лет назад

    Hero

  • @Gabi-tq9ij
    @Gabi-tq9ij Год назад

    I love you

  • @hahaimyourhandlenow
    @hahaimyourhandlenow 3 года назад

    idk why but it just didnt work

  • @arav7737
    @arav7737 5 лет назад

    NOICE

  • @mumtazthebest4460
    @mumtazthebest4460 4 года назад

    Thanks

  • @LCStudiosMC
    @LCStudiosMC 2 года назад

    Thanks