Question by
Zanyblax · Sep 13, 2015 at 09:36 AM ·
javascriptnoobpointsitem pickupcollections
Help..... please..... how do I do this?
Hi!
I wanted help with a script. I need a script that allows me to get one point when I collect an object. My object is collected when I click on it and this part has already been programmed. Basically, I need a point to be added when the object disappears.
Here is my script...
#pragma strict
function OnMouseDown () {
gameObject.active = false;
//Destroy(gameObject);
//renderer.enabled = false;
}
It is a javascript.
If you can help, please do... I really need assistance... Thanks :D
Comment
without knowing anything else:
create an int outside of On$$anonymous$$ouseDown. add one to it in On$$anonymous$$ouseDown.
Your answer
![](https://koobas.hobune.stream/wayback/20220612033536im_/https://answers.unity.com/themes/thub/images/avi.jpg)