Multiple Followcond

O Ilusionista

Captain 100K
There is a way, with scripts, to set different followcond?
Let me explain what I need:

My char jump foward to stomp on the ground and, once it reaches the ground, he does a stomp with throws the enemies to the air which trigger a follow anim.

followcond 3
followanim 1

But, while he is in the air, I want him to damage the enemies, not trigger the follow anim. If I set a followcond, it will trigger on the FIRST hit, not on the frame I want (the second frame).

To make easier to understand:

FRAME 1
FRAME 2
FRAME 3
FRAME 4
FRAME 5

The frame in yellow must be a normal attack and NOT trigger the follow anim.
The frame in red (when he lands on the ground) MUST trigger the follow anim.

I don't want to split the move into one more follow (the move already have 3 parts).

There is any solution using script?
 
The follow code is limited to a single follow. You can certainly solve it with script, but you need to script the follow up yourself rather using script to control the default follow system.

DC
 
Ilusionista, já experimentou dividir essa animação em duas (ou mais) partes? A primeira animação é normal, tem seu ataque e termina chamando a segunda, e aí  na segunda você coloca o follow condition. Não precisa nem mexer com didhitscript  nem nada.





 
Try didhitscript

Something like

void main()
{
void self = getlocalvar("self");


if( getentityproperty(self, "animationid")==openborconstant("ANI_follow1") && frame ==4)
{
performattack(self, openborconstant("ANI_follow2"));

}


}

ani_follow1 é a animação com os dois ataques, sendo que só o ataque do frame 4 é que vai ativar a mudança (irá para o follow2). O resto fica por conta de elaborar as condições de contorno, como ver se o oponente está vivo ainda e seja lá o que mais você queira.
 
Thanks for the code. But that makes me bound to the didhitscript, and I need to check if its on a specific animation to trigger it.
(fica muito engessado, teria que ficar adicionando triggers para reutilizar isso)

I think I will end spliting the animation in two, oh boy...

edit: hum...I got an idea, let me try.

I tried to do the following, but it doesn't works:
Code:
void MoveHit(void Ani, int iFrame, void change)
{
void self = getlocalvar("self");


   if(getentityproperty(self, "animationid")==openborconstant(Ani) && frame ==(iFrame))
   {
   performattack(self, openborconstant(change));

   }


}
 
Pode tentar adicionando um localvar no frame e  usar esse localvar no didhitscript como sendo trigger pro treco. O didhitscript só precisaria ver se aquele localvar existe para fazer a mudança de animação, e adicionar (ou remover) o localvar poderia ser via animationscript, o bom e velho @cmd
 
in english, so everyone understand, please.
Look what I posted above, I want something that I can use mutiple times and no a case specific.
 
Thank you lagarto. That didhitscript for the multiple followconds helps alot. It works like a charm.

O Ilusionista: You can avoid splitting it into two animations for only going with one. But you will need to have beidle set at the end of the first half of the full follow animation you're targetting. You also need to call a specific frame to change to a different frame in the beginning of the second half of the same animation. You probably don't need the hardcoded followcond. That way, you're only gonna have just one follow animation with 2 or more followconds you want. One animation will look like it has two animations.

Alternative idea for : You can avoid splitting it into two animations. If you're going to attack the enemy in frame 3, maybe use updateframe to switch to frame 5 (in the same animation, not follow animation)? Maybe you won't need followcond, so you would need didhitscript?
 
O Ilusionista said:
I ended spliting the animation in two...
I don't know if will fit to your purpose, but I had the same problem and coded a custom followcond for a similar purpose in the didhit event.
In this script you can prevent it for any situation, but need to define each one individually.

Code:
void customGrab()
{//Perform custom grabs in defined animations to avoid "followcond 2" problems
    void self 		= getlocalvar("self");
	void target 	= getentityproperty(self,"opponent"); //CURRENT OPPONENT
	void vAniID 	= getentityproperty(self,"animationID"); //SELF ANIMATION
	void tAniID 	= getentityproperty(target,"animationID"); //TARGET ANIMATION
	void iType  	= getentityproperty(target,"type"); //TARGET TYPE
	void iSubType	= getentityproperty(target,"subtype"); //TARGET SUBTYPE
	int height	= getentityproperty(self,"y"); //SELF HEIGHT
	
	if(vAniID == openborconstant("ANI_SPECIAL") && height <= 0){ //IN GRAB MOVE BUT IS NOT IN THE AIR??
		if(tAniID != openborconstant("ANI_FALL8") && tAniID != openborconstant("ANI_FALL9")){ //AVOID TARGET THROW/SLAM FALLING ANIMATION TO NOT REPEAT THE SAME GRAB MOVE
			if(iType == openborconstant("TYPE_PLAYER") || iType == openborconstant("TYPE_ENEMY") || iType == openborconstant("TYPE_NPC")){ //AVOID TRIGGER WITH OBSTACLES AND OTHERS
				if(iSubType != openborconstant("SUBTYPE_NOTGRAB")){ //AVOID "NOTGRAB" ENTITIES
					performattack(self, openborconstant("ANI_FOLLOW1"), 0); //PERFORM GRAB MOVE
				}
			}
		}
	}
}

As we talked before, you can remove any unnecessary step, except for your current animation and height
 
Back
Top Bottom