Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

Tags not working?

$
0
0
I'm having some problems with the tags at the unity, they are not working i think. What i want is that when the character collides with the ammo, the ammo object is destroyed, and then the character ammo is recharged. here is the code: #pragma strict function Start () { } function Update () { } function OnCollisionEnter(collision: Collision) { if (collision.gameObject.tag == "jogador") { Destroy(gameObject); Arma.contMunicao = Arma.contMunicao+100; } } ---------- the variables are in portuguese(br) the character is tagged with the tag "jogador", but when it collides nothing happens. the collision is working well so i think is a problem with the tags. waiting :)

Viewing all articles
Browse latest Browse all 7934

Trending Articles



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