Special move intro!

kdo

Member
Hello guys, i need some help here.
I know how to do a intro in special moves, like in Marvel x Capcom, it can be done with spawnframe and other methods. But the question is how can i make the special move just show this intro one time in the stage/level? the idea is when the player use the special move a second or more, it dont play the intro anymore so as not to be slow and boring.
So in next level when player use the special move the intro can be played one time again, just one time at each stage.
 
So in next level when player use the special move the intro can be played one time again, just one time at each stage.

One time each stage regardless of continues and lives spent right? IOW if the intro has been played once in a stage, it won't be played again whether player has spent lives and continues or not.
 
Ah that means you could use global variable to store intro's played state. This variable is checked everytime intro is to be spawned. If it's already spawned, then don't play the intro or don't spawn it at all.
This variable is resetted using endlevel.c
 
Alright, here's an example. First declare the script like this:
Code:
anim    freespecial
@script
  if(frame==1){
    int State = getglobalvar("Sx1");

    if(State!=1){
      setglobalvar("Sx1", 1);
      spawn05("Super", 160, 0, 0);
    }
  }
@end_script
...

This character spawns the Super FX using spawn05 function. If you're using spawnframe to spawn your intro FX, you should replace it with equal function and insert it into above script.
Anyways, the script works like this: when FREESPECIAL is played, it checks global variable Sx1. If it's not 1 or not set yet, it runs the spawning function and set Sx1 variable. If the character performs FREESPECIAL again, the variable is set to 1 and won't run the spawning function.
Since this limiting script only lasts in this level, you need to reset that variable in endlevel.c by adding this line:
C:
      setglobalvar("Sx1", NULL());

If you don't have endlevel.c in data/scripts folder, then make one and have that line.
 
Back
Top Bottom