Solved Freespecial for an enemy just one time (?)

Question that is answered or resolved.

Crimsondeath

Active member
Hi to everyone, here I'm with a new small glitch (I hope this is the last one related to SNC x.x).

To create the succubus illussion I used a freespecial that cost all her MP (preventing her from use that freespecial again). But some players activate the Cheat Mode (Infinite Health option), and for some unknown reason that's gives her infinite MP (I think that's what happens), breaking my MP cost method xd.

MEErsGW.gif


I have two request here:
- It's possible to disable succubus freespecial (the one that summon the illusion) until the summoned illusion dissapears or die? So she can summons a new one, instead of her doing the freespecial again without result.

- It's also possible to an enemy do his freespecial just one time under certain conditions? (like he only has 50% of health left?)

Thanks :D .
 
- It's possible to disable succubus freespecial (the one that summon the illusion) until the summoned illusion dissapears or die? So she can summons a new one, instead of her doing the freespecial again without result.

It's possible. The first way is to check number of enemies right at the first frame of the FREESPECIAL, if it's above or same as limit, change into other attack animation. The second way is to store spawned status in personal entity variable after spawning illusion; the status is later be checked everytime FREESPECIAL is performed. Just like the first way, if the status is true, then change into other attack.
The second is more stable in multi enemies situation but it requires the spawned illusion to reset the spawned status on its death. The first doesn't require that but can't be used in multi enemies situation.

Example for the first way:
C:
anim    freespecial
@script
  if(frame == 1){
    void self = getlocalvar("self");
    int Enemy = openborvariant("count_enemies");

    if(Enemy >= 1){
     changeentityproperty(self, "animation", openborconstant"ANI_FOLLOW1"));
    }
  }
@end_script
...


It's also possible to an enemy do his freespecial just one time under certain conditions? (like he only has 50% of health left?)
Yes, just like the above, but with inverted logic by checking health. That is if health is more than 50%, change into other animation.
 
Thanks @Bloodbane , I used this version, I hope helps it to other people too:
Code:
@script
if(frame == 1){
    void vEntity;
    int  iEntity;
    char iType;
    char iName;
    int  iMax = openborvariant("count_entities");
    void self = getlocalvar("self");

    for(iEntity=0; iEntity<iMax; iEntity++){
        vEntity = getentity(iEntity);
        iType   = getentityproperty(vEntity, "type");
        iName   = getentityproperty(vEntity, "name");

        if(iType == openborconstant("TYPE_ENEMY")){
            if (iName == "Sucubo_") {
                changeentityproperty(self, "animation", openborconstant("ANI_FOLLOW2"));
              } else { }
        }
    }
}
@end_script

"Sucubo_" Is the name of the Illusion entity.
"ANI_FOLLOW2" If the Illusion was already summoned it will use other animation instead.
 
Back
Top Bottom