View Single Post
Old 09-15-2012, 09:18 PM   #224
Senior Member
JCarter426's Avatar
Join Date: Feb 2008
Location: Look to your left.
Posts: 1,668
This should do the same as the above... well, not entirely as I'm not sure what all your ifs are checking, but it will heal the whole party by nHealCount:
int i;
int n = ( GetPartyMemberCount() - 1 );

for( i = 0; 0 <= n; i++) {

	ApplyEffectToObject(0, EffectHeal(nHealCount), GetPartyMemberByIndex(i));

I really hate repeated lines of code.

Rather than checking how many party members there are and then doing different functions depending on that, and then applying it to each party member... this simply does one thing to every party member, repeating until there aren't any left.

JCarter426 is offline   you may: quote & reply,