Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

6. Unity3d Tutorial - Melee Combat 2/3

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
18,340
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 16, 2010

Come visit us at: http://www.burgzergarcade.com

This is the second part of a 3 part mini. This set of tutorials will have us setting up a basic melee combat system for our little hack and slash game made with the unity game engine.

Community donated assets can be found under the Educational section: http://www.burgzergarcade.com/catalog

Save time typing out the scripts, or just buy me some coffee: http://www.burgzergarcade.com/product/tutorials/hack-and-slash-tutorial-scripts

  • likes, 3 dislikes

Link to this comment:

Share to:

Uploader Comments (BurgZergArcade)

  • Help

    Unexpected symbol `if ' 

  • @Keromation78 You have a typo. Look around and find it.

  • Hey sorry kind of a noob at this but I have an error: Assets/Scripts/PlayerAttack.cs­(39,21): error CS1525: Unexpected symbol `Debug' Any help would be much appreciated.

  • @Ashyram7 This sounds like you made a typo. Check where the error occurred and also just before it.

  • I don't quite understand the difference between void start and void update. I know what the update function is but i don't know what the start function is so I don't know whether to put my code under void start or void update. Is there any way you can help me on this?

  • @otacon1000 Start is called once when the script is first loaded (it is called after the Awake function). Update is called every frame.

Top Comments

  • @kxmode What until you meet the trapezoids!

  • I just got pwned by a very aggressive cube o_o

see all

All Comments (112)

Sign In or Sign Up now to post a comment!
  • Guys, if you have an error, you're better off trying to fix it yourselves rather than commenting here and waiting a month for a response. 90% of the time your error will be either a typo, a ; error, or a { } error. Just look over your script and you'll be fine.

  • Help!!

    NullReferenceException: Object reference not set to an instance of an object

    PlayerAttack.Attack () (at Assets/Scripts/PlayerAttack.cs­:27)

    PlayerAttack.Update () (at Assets/Scripts/PlayerAttack.cs­:15)

  • Well the tutorials continue to be brilliant and informative, but I am really stuck with the cube attack. It still follows me around ignoring the fact it has the commands to attack, and its identical to how you've done it (i've been re-watching the video for hours now to try and find what I've done wrong) and it just won't have it. I tried removing if(direction > 0)" which also did nothing. Any clues as to what's going on?

  • @anzern

    Well I tried that, and it STILL doesn't work, and its getting annoying now.

  • i just got owned by a cube!!!

  • hey burg, your tutorials are amazing , i havent watched them in a while but ive been keeping up on your current videos and blogs about funny tech unwrapping and unity reviews, thing is i havent needed to use them since i started learning c# from reading a book, now im back cause im compleltly puzzled on raycast it just baffles me left and right, but i know alot of users use it for convience sake. Is it really the convient to use?

  • @anzern it doesnt work i deleted it but dont take damage wrom the cube :(

  • If like me you're finding the cube won't reduce your health, I seemed to fix it by removing the "if(direction > 0)" from the EnemyAttack script when it's checking the distance is below 2.5f

  • @racrub720 thank you!

  • @MartinPivotMaster The fire would have to be at a set position, so im guessing instead of GetKeyUp to cause a set amount of damage you would use the code GetPosition and set and X/Y coordinate where the fire is. You can try that, I believe that might work.

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