Search Unity

Fighting game colission

Discussion in 'Scripting' started by dudedude123, Oct 20, 2014.

  1. dudedude123

    dudedude123

    Joined:
    Aug 24, 2013
    Posts:
    128
    This is close to fighting game collision I can get to. I used the collision from Brackeys. I'm setting up a forum for anybody interested in making a fighting game so everybody can learn to make a fighting game. If you have any improvements, put it on this forum. We have a "be nice" policy, if you have any smartass way of being a dick your reply will be reported.



    <iframe width="560" height="315" src="//www.youtube.com/embed/ApNfgVxaZnA" frameborder="0" allowfullscreen></iframe>



    var Damage : int = 50;
    private var Distance : float;
    var MaxDistance : float = 1.5;
    var TheAnimator : Animator;
    var DamageDelay : float = 0.6;
    var straight;



    function Update ()
    {
    AttackDammage();
    }

    function AttackDammage()
    {



    //Actual attacking
    var hit : RaycastHit;
    var ray = Camera.main.ScreenPointToRay(Vector3(Screen.width/2, Screen.height/2, 0));
    if (Physics.Raycast (ray, hit))
    {
    Distance = hit.distance;
    if (Distance < MaxDistance)
    {
    hit.transform.SendMessage("ApplyDamage", Damage, SendMessageOptions.DontRequireReceiver);
    }
    }

    }[/code]
     
    Last edited: Nov 11, 2014
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    I don't know about anybody else, but I don't have an extra 30 minutes to watch some videos to try and see if I can guess your question. I wish I did, but I just don't.

    Assuming you have a question, would you consider just asking it outright?
     
  3. dudedude123

    dudedude123

    Joined:
    Aug 24, 2013
    Posts:
    128

    I'm trying to work with anybody that wants to make a fighting game, and you might want to reread this post