int i, j;
for(j=0;j<2;j++)
{
for(i=0;i<10;i++)
{
CreateActor("heart_disp", "full_heart", "view", "(none)", 30+i*20, 30+j*20, true);
}
}
if((hp-1)/4 == cloneindex)
{ // hp value at this heart
animpos = hp-cloneindex*4;
}
else if(hp>(cloneindex+1)*4)
{ // greater than current heart's max
animpos = 4;
}
else
{ // less than this heart's min
animpos = 0;
}
DrakeStoel wrote:EDIT: Also, I stated before that I only have full and half hearts, so my animation is only 3 frames. How would I change this script to fit those needs?
DrakeStoel wrote:Ok, so is that ALL the 4s are changed to 2s?
DrakeStoel wrote: And I'm not quite clear on how to add or subtract hearts
skydereign wrote:Now you'll need to prevent hp from ever increasing beyond the max (full_hearts*4), as well as make sure the hearts won't display if they aren't yet obtained. But that should be just a matter of putting in an if statement to set the transp or visibility state.
DrakeStoel wrote: and what division you were talking about
DrakeStoel wrote:or really how to get the hp value to drop properly
Users browsing this forum: No registered users and 1 guest