n00b question

Hey!

I’ma make this ‘mine’, which is basically a cube that “explodes” when a specific layer hits it. (the layer is called ‘impacter’). so basically, i need to make the mine Destroy(GameObject) itself, and change some gui, only when it collides with ‘impacter’ layer.

I am a JS n00b so i have no idea on how the hell i do this :smile: :smile:

From what you are saying, I can clearly see that you have no coding experience. I would suggest starting with a simple unity tutorial or looking at some unity code or resources before attempting to create a game of your own. If you don’t do this, then you will not understand the proper syntax, nor will you properly learn the code. Good luck learning.

No but i know some JS, and i do know the syntax, basically; i just left out some huge chunks in my JS education. anyway, i’m 13 :smile:

but how do i do that stuff? all i need to figure out is : how to use GetComponent, and how to find layer of another GameObject.

No, you need to figure out how to code. If you don’t understand syntax, no amount of us posting code will help you.

Set me in tha right direction then :smile: what to learn first? what objects are? check. variables? check. syntax? yeah i guess.

Have a look at Colliders in the Unity Docs (specifically onEnter and onExit trigger functions), also have a look at GameObject Tags. As you read those sections and look at example code your solution should present itself.

–J