animindex==12... but there's only 3 animations!!
Posted: Thu Jan 27, 2011 12:22 am
I have a health pick up in my game that bases the amount of health restored on it's animindex;
The actor has a main file and three sequences based on it- Small, Medium, and Full (varying degrees of health restoration)
When the pickup collides with the player, the following code runs
Everything works as it should normally, but when I export, the player (C) hp stays the same, but the rest of the code works -destroy actor + play sound
Trying to figure out what was wrong, I set a text actor to report what the game thought the animindex was if it wasnt 1,2,or 3 (it only has the three animations)
It reported 12!
What the heck? there are only 4 animations (counting the master file), how can it be twelve?
Is this some problem with animindex or an export problem or what? This is the last problem I want to solve before posting (exported is smaller, after all)
Please help!
The actor has a main file and three sequences based on it- Small, Medium, and Full (varying degrees of health restoration)
When the pickup collides with the player, the following code runs
- Code: Select all
if(animindex==1){C.HP =30;};
if(animindex==2){C.HP+=10;};
if(animindex==3){C.HP+=3; };
DestroyActor("Event Actor");
PlaySound2("data/pickup.WAV", 0.466667, 1, 0.000000);
Everything works as it should normally, but when I export, the player (C) hp stays the same, but the rest of the code works -destroy actor + play sound
Trying to figure out what was wrong, I set a text actor to report what the game thought the animindex was if it wasnt 1,2,or 3 (it only has the three animations)
It reported 12!
What the heck? there are only 4 animations (counting the master file), how can it be twelve?
Is this some problem with animindex or an export problem or what? This is the last problem I want to solve before posting (exported is smaller, after all)
Please help!