Jump to content
Posted 14 February 2013 - 03:16 PM
Posted 14 February 2013 - 03:34 PM
It's hard to say without seeing any code or knowing what exactly you have going into the functions. As a guess though, you could make an Actor class, so each object of that class could be a monster or party member. Then you'd just send in the object by reference to the functions and you have all of those stats / items / etc in just one argument.
I'm not sure what else you'd be sending in?..
Posted 14 February 2013 - 03:42 PM
For this specifically, don’t add a bunch of parameters to the functions.
Some of my functions have 12 parameters, and it is annoying and unelegant to add new features.
Edited by L. Spiro, 14 February 2013 - 03:47 PM.
Posted 14 February 2013 - 03:44 PM
Posted 14 February 2013 - 03:50 PM
Since I edited my posted just after your reply and you probably missed it, be sure to look back on it for the link and the tips within.