Okay, so you have three animation sets; standing, running, and jumping. Each has three animations, start fire, firing, end fire. To do this smoothly I would suggest a variable, though you can use built in ones. Create a variable called fireState, or some other. In this, I probably won't use fireState, as it will be for antimoonwalk regulation, which I won't go into here. If you need antimoonwalk code, I will need your .ged.
player -> KeyDown(fire button[Disabled]) -> Script Editor
- Code: Select all
char* key = GetKeyState();
fireState=1;
if(key[KEY_RIGHT]==1 || key[KEY_LEFT]==1)
{
//ChangeAnimation(running start);
}
if(jump==0)
{
//ChangeAnimation(jump start);
}
if(key[KEY_RIGHT]==0 && key[KEY_LEFT]==0 && jump==0)
{
//ChangeAnimation(stand start);
}
If you didn't know, the // means the line is commented out. Insert your ChangeAnimation there. Now you use a similar method for the animation finish. If the fire button is still pressed, increase fireState and change the animation to the rapid fire. Now the animation will repeat, until you let go of the fire button so add a keydown event, starting the end rapid fire animation. You can use the above method to determine the animation. Then on the animation finish of the end fire animations, switch to your normal. This, if implemented wrong, will most likely cause moonwalking, this is just a guideline. Again, if you want my help, I can edit your .ged.