I know you guys may get this quite often, but How hard i it to make an attack system, because I was just thinking of all the stuff I have to join onto it, like , I've made a simple attack system where I press attack and it randomizes a number between 5,10. but I've also got a strength stat on this so that I can raise my level, How would I make it so that apon a certain strength level it does a certain damage depeneding on the strength level...
Thanks for reading
Nexus6669.
p.s sorry for posting so much.
ID:166518
Jul 26 2006, 4:14 am
|
|
Nexus6669 wrote:
I know you guys may get this quite often, but How hard i it to make an attack system, because I was just thinking of all the stuff I have to join onto it, like , I've made a simple attack system where I press attack and it randomizes a number between 5,10. but I've also got a strength stat on this so that I can raise my level, How would I make it so that apon a certain strength level it does a certain damage depeneding on the strength level... in order to have a strength based battle system, you have to of course have a strength var
var/strength = 1
now, in your battle system, wherever you figure up the damage, simply use the strength var
var/damage = strength + rand(5, 10)
get it? |
In response to Koil
|
|
Ok I get it, thank you very much, you have been most helpfull :)
|
In response to Nexus6669
|
|
mob/Move() Here's the code to lift a weight and gain strength. mob Here's the attack code, for some reason "var/damage = strength + rand(1,2)" I think there is something wrong here, it compiles ok, but it won't add the strength from my stats onto the random part. hard to explain, say it's like it won't add the strength on the random. |
to get your attack power.