Ok, so I am designing a basic game that has creatures chasing you, and you have to jump to dodge them. The creatures are suppose to damage the player when they come into contact with the player, and after ten or so hits, the player dies. I am new to Unity, and have a very limited knowledge on JavaScript. All my code is in JavaScript, so keep that in mind. I have tried all the scripts I wrote, and all the ones I could find on the internet. What I really need is a simple mesh colliding damage system, with health and damage displayed as a variable. The script that I wrote at the start was a single code, applied to the player, and having the variables of “what mesh would cause damage on collision”, “health of player”, and “damage caused by a single collision of said mesh” (not in those exact words). Can you tell me how you would do it, if I was on the right track, and any tips and tricks involving this sort of collision problem. I want to learn how to do this, so If anyone does post code, add captions to show what each line does.
-Thanks