Code:

// Has 3 animation cycles
define ASceneMax, 3;

string AScene[ASceneMax];
...
ACTION RandomAnim
{
AScene[0] = "Walk";
AScene[1] = "Run";
AScene[2] = "Stand";
// ...
while(1)
{
if (!my.skill10 & key_space)
{
my.skill11 = int(random(ASceneMax));
//
my.skill10 = min(my.skill10 + (my.skill1 * time), 100);
ent_animate(my, AScene[my.skill11], my.skill10, 0);
wait(1);
}
wait(1);
}
}



This should work, but I'm not sure if you can use arrays with strings. If not, then I've got another example for you...

Last edited by xXxGuitar511; 03/03/07 00:17.

xXxGuitar511
- Programmer