Thanks a ton for all of your help Primal.
I thought about not limiting the health to 100, but I am actually combining this with some weapon modifications I have been tweaking that involves critical hits and slightly amped up weapon, and I didn't want to make it too easy on the player. That's also why I kept the amount of health gained a bit low in order to balance things out a bit. But I think I will give it a try with your idea of a 150 max to see how it plays out.
Not totally sure what you meant by that last line. How would defining it differ from how I did for "r=random()"?
Was also already thinking of what you mentioned about making the amount bigger for tougher enemies, but went against it cause with the weapon mods, the shambler is a little bit easier to kill so I didn't want the reward to be too big.
I am more of a newbie than you obviously and I really appreciate the help. Have mostly been learning by looking at available code and tinkering with some copy/paste testing. I knew there mus have been some unneeded code still in there, but I wasn't totally clear on what could and couldn't be left out.
Speaking of which, I don't know if you saw my edit at the bottom of the op, but I was having issues getting the pitching monsters to work. Any ideas what might be wrong with that one?
Thanks again very much.
I thought about not limiting the health to 100, but I am actually combining this with some weapon modifications I have been tweaking that involves critical hits and slightly amped up weapon, and I didn't want to make it too easy on the player. That's also why I kept the amount of health gained a bit low in order to balance things out a bit. But I think I will give it a try with your idea of a 150 max to see how it plays out.
item.health = 6 + 20*random();
//change it to
item.health = floor(6 + 20*random());
//if you decide to define this you'll need to set a float much like you did with r=random ().
//change it to
item.health = floor(6 + 20*random());
//if you decide to define this you'll need to set a float much like you did with r=random ().
Was also already thinking of what you mentioned about making the amount bigger for tougher enemies, but went against it cause with the weapon mods, the shambler is a little bit easier to kill so I didn't want the reward to be too big.
I am more of a newbie than you obviously and I really appreciate the help. Have mostly been learning by looking at available code and tinkering with some copy/paste testing. I knew there mus have been some unneeded code still in there, but I wasn't totally clear on what could and couldn't be left out.
Word of caution when using tuts from Inside3d. They often have lots of typos :/ So quite a few of the examples and tuts won't work if you simply copy and paste them. So check the syntax first.
Thanks again very much.
Comment