Search Unity

how to add damage amount to different animations

Discussion in 'Getting Started' started by PRABHBIR123, Apr 23, 2017.

  1. PRABHBIR123

    PRABHBIR123

    Joined:
    Apr 9, 2017
    Posts:
    72
    like I want to create a wrestling game and when a user press alpha 1 attack animation should start and that should deal damage to enemy player when a player press alpha 2 amimayion attack 2 should start and should deal different damage to enemy player. i don't have any code please help
     
  2. Schneider21

    Schneider21

    Joined:
    Feb 6, 2014
    Posts:
    3,512
    While a wrestling game sounds a good bit simpler than an open-world city game, I think you're still reaching quite a bit beyond your skill set.

    Answer honestly: Have you done the tutorials? If so, which ones? If not, why not?

    The point I'm trying to make is that if you had gone through the tutorials and learning content available to you, your question wouldn't be "I have no code, please help", but more like "I have this code, and this is the specific part I need help with."
     
  3. Taorcb

    Taorcb

    Joined:
    Mar 15, 2015
    Posts:
    39
    First thing, that was really hard to read. I spent a full minute trying to figure out what you were asking.

    Regardless, you should try some tutorials before coming directly to the forums. They're terrific, you'll learn a lot, and you probably won't run into these kinds of problems.

    Anyways, for timing damage, I'd suggest animation events that pass a float or an integer to a function that deals damage to the other player. Look them up, it'll do you far more good than if I explained them here.
     
    Last edited: Apr 25, 2017