Search Unity

Help Needed:- Melee Combat

Discussion in 'Scripting' started by Fr3ds, Nov 13, 2016.

  1. Fr3ds

    Fr3ds

    Joined:
    Nov 13, 2016
    Posts:
    1
    Hey guys, Fred here. So for the past month or so I've been working on a nice little third person game, but I've become really stuck with the combat. I've given the scripts 5 tries, but I've managed to mess it up 5 times... Anyway, I'd like to ask for some help from you guys! What I'm looking for is a script that will allow a third person player to engage in sword, ax, bow and fist combat with enemies. As I'm intending to sell the game eventually, when I do I'll send you a free copy of the game, plus your name in the credits (if you want it). All I ask is a little bit of help on this and any other major issues I can't solve myself. Many thanks in advance!
     
  2. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
    Which aspects are you stuck on?

    No one's going to write the entire script(s) for you, especially for something so highly specific, but we can definitely help you out. For starters, try adding trigger colliders on your melee weapons to detect when they've struck something.
     
  3. Zaflis

    Zaflis

    Joined:
    May 26, 2014
    Posts:
    438
    And secondly you can control when the trigger colliders activate in the Animator. Shouldn't be active all the time, only during the melee animation. That requires no code either, only the part where enemy takes numeric damage does.