Hello guys, well I have been working on a melee combat code. I was checking out a video of BurgZergArcade "Melee Attack"on how to create a very simple Melee attack script and I saw a function that would be really helpfull in my script, the function was:
public void AddjustCurrentHealth (int adj){
curHealth == adj;
}
Then when he needs to quit 10 points, he just wrote:
function AddjustCurrentHealth (adjustment : int)
{
curHealth += adjustment;
}
Also, I’m pretty sure that C# code is wrong. You shouldn’t be evaluating curHealth, you should be changing it.
In any case, burgZerg annoys me with his deliberately mis-spelled names everywhere…
You should learn how to translate between the two main languages used in Unity. While I wholeheartedly recommend that you use C# exclusively (it is a comprehensively better language, but let’s not get into that), the process of translation is really not hard and will teach you a bit about the details of them both.