Quantcast
Channel: Questions in topic: "melee"
Viewing all articles
Browse latest Browse all 201

How do I make my melee script do damage.

$
0
0
I have a melee script but I don't know how to make it do damage to either an ai or a player here is the script so far it is in js. var target : Transform; function Update () { var dist : float = Vector3.Distance(transform.position, target.position); if(Input.GetKeyUp(KeyCode.Mouse0) && dist <= 2.1){ GetComponent.().Play("Default Take"); } if(Input.GetKeyUp(KeyCode.Mouse0) && dist > 2.1){ GetComponent.().Play("Default Take"); } }

Viewing all articles
Browse latest Browse all 201

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>