Added: 1 year ago
From: BurgZergArcade
Views: 25,570
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (127)

Sign In or Sign Up now to post a comment!
  • AWESOME TUTORIALS!

  • I was an idiot and didn't install MONODevelop with my Unity

  • Awesome! Can u make a tut where the enemy shoots at u instead? For like a fps? Thanx :)

  • he can go inside me ._. it's a little problem that you should fix .__.

  • How can you make it so that the cube only rotates on the X axis, because when i jump the cube rotates upwards :P

  • @TheFleming98

    add these two lines after transform = Quaternion.Slerp(.....);

    transform.rotation.x = 0; //or to whatever initial rotation it was

    transform.rotation.z = 0;

    There might be an easier way and more efficient, but that does the trick :)

  • That Cube is really freaky. Imagine if a cube chased you around in real life! :O

  • Comment removed

  • oaaaaaaaaaaf it says "Script EnemyAI has not finished compliation yet.

    Please wait until compliation has finished" i cannot fix it im sure i did everything right i saved it i even did watched video again but no nothing made any change on it

  • Handles errors like a boss B)

  • i want reiew your scripts. I want do some similar

  • btw I love your tuts they are the best

  • How do you make your unity black??

  • Omg he is evil. :O And want to catch me O.o ruuuun. Very nice tutorial, I'm going to watch the next one. :)

  • By far the best tutorials of Unity on YouTube! You're awesome dude!

  • @tectful Glad you are enjoying them. Tell your friends :)

  • Please help me! I did everything just like you did, but I didn't add the script to the player till I finished the script, but now it is telling me that all the compiler errors have to be fixed before I can add the script. I believe that the script is causing that problem, or that script "fighting" against other game object. Do you have any tips? Cause I checked the script twice to see if I did it right. :(

  • I got an error. :( "All errors have to be fixed before you can enter play mode" What do I do now?! Is there any way to fix it without deleting the script?

  • Great tutorial! I like the way you go through all the coding, instead of blasting through it at mach 12 :P. There is a problem though, once my enemy had reached me, he kind of slides under and pushes me into the air straight up, any suggestions?

    

  • @CarnivorousFood This is just the beginning, there is a lot more to do before the game is done.

  • @BurgZergArcade Alright sounds excellent :)

  • @BurgZergArcade I have something that I have been trying to find and answer to for months, how do I create mouse click movement as in diablo or Torchlight. So when I click on the ground (the camera is above the player) and the player goes to where i clicked and at the same time a particle effect appears where I clicked. Please help.

  • I cant open up mono development! I set the script editor to mono development, and then I hit sync mono develop, then I try to open my health bar, or whatever kind of script I try to open, but it wont open it.

    can you help me?

  • @Crioxide1 I have no idea what is wrong. It works for me.

  • @Crioxide1 Did you install monodevelop into C:/programfiles(x86)/unity/mon­odevelop/ ?

  • Your tutorials are soo helpful!!

    Thank you !!!!!! ^-^

  • mine wont move forward at me and i copied the code exact, what do i do?

  • @RedCrowFilms No idea. I am not sure what you did wrong.

  • @BurgZergArcade ok i got it to move towards me but now as its coming at me its floating. How do i keep it on the ground?

  • @RedCrowFilms Remember to make sure that you have given it's moveSpeed variable a value greater than 0.

  • WOW! you are very good at this! i am learning C# and you really helped me :)

  • using UnityEngine;

    using System.Collections;

    public class EnemyAI : MonoBehaviour { public Transform target; public int moveSpeed; public int rotationSpeed; private Transform myTransform; void Awake() { myTransform = transform; } void Start () { GameObject go = GameObject.FindGameObjectWithT­ag("Player"); target = go.transform; } void Update () { Debug.DrawLine(target.transfor­m.position, myTransform.position, Color.yellow); }

    }

    DOES NOT WORK! I Got It Too Before WTF!

  • Okay This Is A Bunch Of Crap. It Wont Rotate Correctly, I Have Copied Every Last Friggin Space And Letter On The Video, THIS DOES NOT WORK WORTH A CRAP!

  • how do we move it and animate him when he attack and stuff like that?

  • @sanfelipe007 there are over 250 episodes in this tutorial now i guess he will come to that point in some of those

  • @Mangareader1994 i espect it :P ill search thank you and may be he will put the codes in the comments ...well i dont expect miracles xD

  • Assets/Scripts/EnemyAl.cs(29,9­1): error CS0117: `UnityEngine.Quaternion' does not contain a definition for `LookRoatation'

    HELP!

  • i want mine to rotate on the y only, how do i do this? ive got zombies and they are running on a 45 degree angle on the x and its really weird as they only need to rotate on the y

  • Let me guess, you stood in your mob farm while recording? xD

  • Nice job, I really like these tutorial series !

  • @florethebrave Glad to hear because there is quite a few more a head of you in the series ;)

  • mine don't want to move. here's the code. have i done something wrong? // Update is called once per frame void Update () { Debug.DrawLine(target.position­, myTransform.position, Color.yellow); //Look at target myTransform.rotation = Quaternion.Slerp(myTransform.r­otation, Quaternion.LookRotation(target­.position - myTransform.position), rotationSpeed + Time.deltaTime); //Move towards target myTransform.position += myTransform.forward * moveSpeed * Time.deltaTime; }

  • thank you! this is awesome!

  • @willdobbies Glad you enjoy them :) Help spread the word!

  • how do you make it so its only following you if you are near?

  • You can ride the cube like this haha

  • @kxmode you still have something wrong.

    It should be :

    myTransform.rotation = Quaternion.Slerp(myTransform.r­­otation, Quaternion.LookRotation(target­­.position - myTransform.position), rotationSpeed * Time.deltaTime)

    If you dont notice anything,

    at the second line, the target.position, myTransform.position has to be changed to target.position - myTransform.position

  • Cubie isn't rotating.

    myTransform.rotation = Quaternion.Slerp(myTransform.r­otation, Quaternion.LookRotation(target­.position, myTransform.position), rotationSpeed * Time.deltaTime);

    I checked, double checked, and triple checked the code. Everything looks as it should be. Help please.

  • @kxmode nm. i figured it out. i had to set move speed and rotation speed to 1. Weird how I didn't catch that the first time.

  • @BurgZergArcade Please help i keep getting this error

    NullReferenceException

    UnityEngine.Transform.get_posi­tion () (at C:/BuildAgent/work/842f9557127­e852/Runtime/ExportGenerated/E­ditor/UnityEngineTransform.cs:­19)

    EnemyAI.Update () (at Assets/Standard Assets/Scripts/New Folder/EnemyAI.cs:26)

  • Assets/Scripts/EnemyAI.cs(34,1­): error CS8025: Parsing error ?

  • My unity says it do not have a definetion for Quarternion

  • @hejistuen12345 Looks like you spelled it wrong.

  • @BurgZergArcade yeah he spell it 'Quarternion', it should be 'Quaternion'.

  • @hejistuen12345 try Quaternion

  • i got this error please someone help the error is:

    NullReferenceException

    UnityEngine.Transform.get_posi­tion () (at C:/BuildAgent/work/6bc5f79e0a4­296d6/Runtime/ExportGenerated/­Editor/BaseClass.cs:771)

    EnemyAI.Update () (at Assets/hach and slash scripts/EnemyAI.cs:26)

    and it was found it this script i wrought down:

    Debug.DrawLine(target.position­, myTransform.position, Color.yellow);

  • @40paschal nvm i fixed it awsome tutorail

  • Who else was screaming at their laptop telling him he spelled transform wrong?

  • Help please I have two errors!

    Assets/Standard Assets/Scripts/BattleQuestScri­pts/EnemyAI.cs(28,51): error CS1501: No overload for method `Slerp' takes `2' arguments

    And

    Assets/Standard Assets/Scripts/BattleQuestScri­pts/EnemyAI.cs(28,69): error CS1061: Type `UnityEngine.Transform' does not contain a definition for `rotaition' and no extension method `rotaition' of type `UnityEngine.Transform' could be found (are you missing a using directive or an assembly reference?)

  • i get these 6 errors can someone help me

    1.Assets/enemyAI.cs(29,110): error CS0103: The name `position' does not exist in the current context

    2.Assets/enemyAI.cs(29,90): error CS1502: The best overloaded method match for `UnityEngine.Quaternion.LookRo­tation(UnityEngine.Vector3, UnityEngine.Vector3)' has some invalid arguments

    3.Assets/enemyAI.cs(29,90): error CS1503: Argument `#1' cannot convert `UnityEngine.Transform' expression to type `UnityEngine.Vector3'

  • @bannanser

    For newer version, use Vector 3 variable in the Quaternion.LookRotation function:

    Vector3 relativePos = target.position - myTransform.position;

    myTransform.rotation = Quaternion.Slerp(myTransform.r­otation, Quaternion.LookRotation(relati­vePos), rotationSpeed * Time.deltaTime);

  • Wow Thanks for the help, i know this is basics but it seems that this can be used for flying units because if i jump on top of it it flys upwards, Thanks man

  • Wow this was helpfull! I love how you go in depth with everything. Thanks! :) Now alls we need is a tutorial for a pathfinding AI in C#. Up to the challenge? Lol.

  • @SuperiorOnRoblox Unity is adding the feature later this year. I will just wait.

  • @BurgZergArcade Do you know when exactly?

  • @SuperiorOnRoblox Nope, Just some time this year.

  • @BurgZergArcade Alright, thanks.

  • @BurgZergArcade path finding.. like avoiding objects? that sounds great! =D cant wait to have a horde of zombies crashing up a winding staircase

  • @BurgZergArcade the evil cubie fly´s away why?

  • @SuperiorOnRoblox just implement the A* algorithm

  • Hi. I didn't get the "Quaternion.LookRotation(targe­t.position - myTransform.position)" part. Can anybody explain that please? Thanks...

  • nvm i fixed it

  • @iwilleaturtacos Glad to here you got it sorted out.

  • Hello Petey, thanks for tutorials. It's cool! I don't writing this script in CSharp language, but i am rewrote this script from JavaScript.

    Sorry for my poor english language :)

    Thanks Petey!

  • help i keep getting this error

    UnassignedReferenceException: the variable taget of "EnemyAI" has not been assigned

  • i keep getting NullReferenceException

    UnityEngine.Transform.get_posi­tion () (at C:/BuildAgent/work/6bc5f79e0a4­296d6/Runtime/ExportGenerated/­Editor/BaseClass.cs:771)

    EnemyAI.Update () (at Assets/Scripts/EnemyAI.cs:29)

  • Just spent a couple of minutes staring at the rotation line, trying to work out why the hell it was throwing up errors. Then realised I'd typed "Quaternian" not "Quaternion"....x)

  • @NoodlesTux Everyone makes typos. In the later episodes of this series, I start to leave in a lot of my typos and errors as most find it helpful to see how I go about fixing them.

  • thumbs up if you think you heard minecraft in the background at 3:18.

  • you should copy and paste the script in the info so we can copy and paste it, because i always have an error if i copy it world for world. but when i copy and paste it works great. i always get complie errors

  • @MrPoof15 You won't learn anything from that don't be lazy. 

  • @MrPoof15 he has it on his website it costs money though

  • Nice tutorials!

    BrumDogProductions

  • if jump on enemy you'll fly XD

  • I dont know if its fixed later on, probably is, but when you jump over the cube it rotates in a kind of funky way (I cant rly explain it) and moves in every possible direction (what I mean is I jumped on the cube and flew away).

    Did I make some error or is it supposed to be like that?

  • After this vid, my "Evil Cube " rotates around me, and move slowly toward me.

    What should be the problem?

  • @GamesEvolved I already fixed it, the movespeed too high

  • @GamesEvolved thats what we want! to change the moving speed, just change the thing that says Move Speed on the inspector for the cube.

  • @Xalien2002

    what are you saying? nobody asked this xD

  • Whoaaa Thanks man you do so great thanks again everybody need to see your videos with volume TornadoTwins are very good but they dont explain everything but you explain thanks again

  • scripting is hard but you make it look easy lol

  • it would be nice if you made a few beginner episodes of C# so people could be 100% on everything in the series, just saying it would be nice :)

  • @ibxtoycat

    I was a bit familiar with C# already because I know a bit of Java. They are alike. So you might wanna work on the basics of Java then use C#.

  • @ibxtoycat I have it planned, but right now all of my free time is spent getting the basic implementation of this game done. I will be taking a break after this wave of tutorials to get a few more smaller ones out before I start on the second leg of the tutorials.

  • @BurgZergArcade btw u are a great teacher!! thank u for this tutorials

  • @BurgZergArcade awesome your gonna make c# programming tutorials!( i don't really like it but your a great game development teacher!)

  • haha i did it good you got errors xd lolxdxdxd

  • These tutorials are great, but i have a problem. When ever I start the game instead of the cube coming towards me it just floats away. Any idea why this would happen and how to fix it?

  • @FlashNInja4 Make sure you are using myTransform and not vector3 when moving.

  • This is better than tornado twins. -FULL STOP.

  • i completely understand the whole concept,and know it,my issue starts when you ever try to put walls infront of enemy,and see what happens,thats where my problem lays,enemy is dumb and cannot find a way to target :(

  • @shadmehr2008 That's because the AI script we make is very simple, it doesn't give the AI a thought process of "Hey there is a wall there".

  • my cube goes away from my character.  I have no programming experience whatsoever and dont know how to fix this.

  • @reaverdeath9999 nvm, fixed it sorry.

  • @BurgZergArcade Thank you for these great tutorials :D

  • Your the best! TornadoTwins is good, but you are actually showing us how to make enemies move and melee combat! More people need to watch this! = D

  • @gearsforgizmo Efran is a much better speaker than I am on video. I can stumble on trying to get the words out that I want at times, but if you do not mind me babbling every so often, then keep watching!! It gets a lot better :)

    Tell everyone you know about it if you like it :) I feed off my popularity!

    I am also having a live show tomorrow night (Wednesday) at 7:30 EDT over on burgzergarcade[dot]com/live-fe­ed

  • @BurgZergArcade I didn't really notice any stumbling! I am positive I will keep watching! I'm on the Melee Combat 3/3 video and can't wait to see what you do next! I'll be certain to check out your show tonight! = )

  • @BurgZergArcade im not a native speaker and i can still understand you without any problems. What i realy like about you and your tutorials is that you dont just say "do this" but instead actually explain why you are doing it and what the script will do.

    Also, i love the fact that you take the time to reply to people's comments and help with our problems. +Sub <3

  • @BurgZergArcade well your tutorials dont cost and im 11 so i dont have 100 dollars for his so thxs

  • i get an error when the script is finished. it says: Assets/Scripts/EnemyAI.cs(11,9­): error CS8025: Parsing error

    i dont know whats the problem?

  • @wasstraat65 Sounds like you have a typo. Possibly a missing semi colon (;).

  • My cube keeps spinning around me when I stop moving and when I back the character it tries to chase me from under my character and it pushes me upwards. Pretty hard to explain but it is very weird.

  • @eragonrex1 You may have to increase the max distance. This should stop the spinning.

  • @BurgZergArcade Yeah, where in the script should I change?

  • @BurgZergArcade It doesn't want to stop when I stop so it tries to catch me but it cant.

  • set the Move Speed to 900 and see what happen xD

    it's funny!

  • Comment removed

  • @ShadShadow92 It was so funny my Unity Editor stopped working

  • nevermind fixed my error :D

  • Awsome tutorial just some questions

    1.Is it a 1st person game or 3rd???

    2.when I jump the cube also jumps is that supposed to happen?

    3.When not playing in ur vid the cubes target resets, mine doesn't but still does everything well (like in the video).

    Thx

  • @JEWSDONTJIZZ 1. It will be a third person game. We are not at the camera scripting yet.

    2. The cube will follow you in any direction you go in right now. We will be adding rigidbodies later that will make then no float.

    3. I am not sure what is going wrong. Can you post what you have?

  • oops for to put tut in my last comment o.o

  • again nice sucks that i have to start from part 1 again -.- cos my laptop blew up

  • @Dudehell1 That sucks. On the bright side, after learning this and doing it a few times, it should only take you 5-10 mins to catch up again.

  • @BurgZergArcade yea :D

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more