follow1-pain1, f2-p2, f3-p3, and so on...

jonsilva

New member
hi...
iam trying to make an enemy play a diferent pain animation for every anim follow he has...
the enemy goes to follow1 right after he spawns... the player only has 2 type of attacks (attack front/attack back)...

now i know theres a script damage that checks the health bar and plays a follow... but using it would make things very unbalanced.. for example if he has a health of 3000...

i was wondering if theres a script that plays an animation when a character gets hit in a certain animation... i wanted to give the pain reation to the victim instead of the attacker...

like...
follow1 plays (pain1) - or anim X
follow2 plays (pain2) - or anim X
follow3 plays (pain3) - or anim X
follow4 plays (pain4) - or anim X
and son on....

 
;D ;D ;D !!!

it wont work the enemy image has a size of 2200 x 650, iam using video 1... its an enemy bigger than screen (its a giant space ship)

the lower part of the ship pops an eye kind like those scopes that the submarines use, but this one goes down instead of going up...

what gives the player the ability to kill the ship is hitting this eye... but he has to move foward and back in the level because the eye appears in 3 diferent points of the ship (front/middle/back)... (it hiddes and appears in other point as it gets hit)
 
You need takedamagescript that checks what animation is currently being used and if the entity is taking damage, then tell it to switch animation based on current anim.
 
You could use counterrange with followanim to do that , but you'll need to use custom pain animations with anim follows (no script involved)

Code:
counterrange {start} {end} {condition} {damage}

    ~Animation header
    If all conditions are met, entity will perform animation set by followanim.
~This command is to make entity performs FOLLOW{#} if the entity is hit in set frames.
  ~{start} Start of frame range when counter may trigger.
    ~{end} End of frame range when counter may trigger. 
~condition determines the condition requirements before FOLLOW{#} is played.

    1: The counter will always be used.
    2: The counter will be used as long as the attacker was an enemy (Or a player if an enemy uses it).
    3: The counter will be used as long as the attacker was an enemy, the attack was not unblockable, hits the user from the front, and was not a FREEZE attack. 

~damaged determines whether the entity will receive damage from the hit or not.

    0, the damage won't be taken
    1, the damage will be taken 

~Which FOLLOW animation played is determined by 'followanim'. 
 

Code:
Followanim {value}

    ~Determines which FOLLOW animation played when followup condition is met or when counter condition is met.
    ~Possible values are 1, 2, 3 and 4.
    ~Used together with 'followcond' or 'counterframe' or 'counterrange'.


e.g.:

anim follow1

    counterrange 1 5 1 1
    followanim 11
    delay 1
    offset 34 91
    bbox    0 0 0 0
    frame data/chars/kyo/000.gif
    bbox 13 3 30 83
    delay  6
      frame data/chars/kyo/001.gif
      frame data/chars/kyo/002.gif
      frame data/chars/kyo/003.gif
      frame data/chars/kyo/004.gif
      frame data/chars/kyo/005.gif

anim follow11 #anim pain1
        delay         20
offset 100 200
bbox         80 100 32 100
frame data/chars/ryo/ryo0229
frame data/chars/ryo/ryo0209
frame data/chars/ryo/ryo0184
frame data/chars/ryo/ryo0209
 
You could use counterrange with followanim to do that , but you'll need to use custom pain animations with anim follows (no script involved)
thanks
counterrange seems to do what i had in mind. iam using the old manual from lavalit... its the frist time iam seeing this command

You need takedamagescript that checks what animation is currently being used and if the entity is taking damage, then tell it to switch animation based on current anim

ive tried to use takedamagescript... but i whanted it to make it work with //changeentityproperty(self, "animation", openborconstant(Ani));
and call the animation Nº in character.txt
instead of writing the animation Nº in the script...
but i couldnt find a way to call it this way...

it also needs to switch to another IDLE animation (follow2/3/1)/(front/middle/back) when it gets hit... this way the player needs to move foward and back in the level to damage the eye.

the eye only has 3 things (spawn/idle/pain) but it appears in 3 diferent positions (front/middle/back) but it all works has one entity ive made it all in the same image so it could use the same health and stuff... this makes to many frames and animations... making the animation change in the character txt gives me a better of view of where i want to put it...




 
Back
Top Bottom