I am now working on an encounter system. I would like to be able to pre-define each monster type, its stats, level etc.. but i don't want to duplicate the combat function for each type of monster and for different levels.

in game You choose an option that triggers encounter
sends you to encounter check which loads specifc variables into global variable for that encounter type, then triggers combat function where you have your fight then triggers my experience levelup system to see if you need leveling etc. then returns back to game.

My thoughts are mainly how do i upon triggering the encounter function load the exact section of code needed to adjust the variables the best i could come up with is a ton of encounter functions just to store the variable transfer routines that way i dont have to duplicate the entire combat function

I have never used structs before, and the chance to hit and other calculations are already part of the combat routine. I plan on storing the monster information in global variables. The only things i need is to figure out which monster and lvl pull the information from the variables and run it through the combat function. Could you post a full example?

09-01-2010

Salem

> Could you post a full example?
Based on the size of the hole you've dug for yourself already - no.

> I have never used structs before
That's not an excuse for not starting now.

> I plan on storing the monster information in global variables.
If you plan on keeping with bad design, then there's nothing more I can do for you.