#Want to know how I can subtract Opp health from dmg (i.e Opp - dmg)
1 messages · Page 1 of 1 (latest)
void TakeDamage(int damage)
{
health -= damage;
}```
@silk bear
to call the method
TakeDamage(number/variable for damage);
So I can implement that within the DanMove() class?
yeah i think so
Ill try it real quick and let you know. Thank you.
isnt danmove a method anyway? you cant put methods in methods you can only call other methods
Yeah it is.
also you could have googled to figure this out instead of waiting so long
you can replace the name takedamage with danmove and put (int dmg) in danmove
Anywhere?
you would need to get the random number when you call the method instead of doing it inside of danmove though
i think its better to just if danmove is 1 TakeDamage(variable/number here); and use another method for everything else
One sec. brb