A question about knockdown

esn23

Active member
okay here is the question is there a specail script we can make for the sentinels and other enemies so that they can be immune to knockdown but still be shocked burned and frozen. for example i know when you freeze an enemy the next hit knocks them down could we do a script that we can put in the char where they can be frozen burned or shocked and not have it knock them down?
 
Because it's not proper freeze, using proper freeze they can be frozen in any animation.  With custom pain they are always frozen the same way.  I suggested it too, but it kind of sucks to change every other enemy, just to work around a problem with one of them.  I'm sure you could script around it, but that just seems pointless extra work.  Freeze needs a knockdown flag, so we can control this easily.
 
Well its not one enemy its all enemies.  The problem is if they are immune to knockdown they cant be frozen burned or shocked.  Maybe if I use the defense flag differently because with defenseall makes them defend against everything.
 
With custom pain they are always frozen the same way.
Hum, I think there is a way, but the enemy will be frozen always for the same time.

Save this as freeze.c and declare at takedamagescript:

Code:
void main()
{// Custom Freeze
    void self = getlocalvar("self"); //Get calling entity.
    int Type = getlocalvar("attacktype"); //Get the atttack type

    if(Type == openborconstant("ATK_NORMAL2")){ //if being hit by the specific type
      changeentityproperty(self, "freezetime", 100);// freeze the entity for 100 centiseconds
      changeentityproperty(self, "colourmap", 6); //change for the fmap
      changeentityproperty(self, "maptime", 100 + openborvariant("elapsed_time"));//set the map time.
    }
}

Change the ATK_NORMAL2 for the attack you choose. and choose the desired map at the "colourmap" line.
To change for how much time the enemy will be frozen, change the "100" value.
 
thanks o i will try this out in a bit.  i got your sprites i will try to work on them tonight can you send me a sprite of her so i can pull colors and stuff off of her
 
hmmm its still not working here is what i have for sentinel
name Sentinel
type enemy
health 400
speed 6
nodrop 1
knockdowncount 999
cantgrab 1
falldie 1
nodieblink 2
#nopain 0
shadow 4
defense normal8 0.0
defense normal6 0.0
defense normal1 1 16
defense normal2 1 16
defense normal3 1 16
defense normal4 1 16

icon    data/chars/sentinel/icon.png

load slaser
load slaser2
load sdie
load sdust
load sdust2
load sgren
load ssmoke

animationscript data/scripts/escript.c
takedamagescript data/scripts/blink.c
takedamagescript data/scripts/freeze.c

palette        data/chars/sentinel/w1.png

alternatepal    data/chars/sentinel/dmgmap.png

alternatepal      data/chars/sentinel/freeze.png
fmap 2

and this is the script
void main()
{// Custom Freeze
    void self = getlocalvar("self"); //Get calling entity.
    int Type = getlocalvar("attacktype"); //Get the atttack type

    if(Type == openborconstant("ATK_NORMAL12")){ //if being hit by the specific type
      changeentityproperty(self, "freezetime", 100);// freeze the entity for 100 centiseconds
      changeentityproperty(self, "colourmap", 2); //change for the fmap
      changeentityproperty(self, "maptime", 100 + openborvariant("elapsed_time"));//set the map time.
    }
}

He doesnt freeze at all did i do something wrong?
 
Back
Top Bottom