Boss/enemy jumping onto background/stage platform briefly for an animation?

MysticalMist

Active member
How would you guys go about making an animation like what Rolento does in Final Fight, where he can jump up onto one of the construction beams of the elevator to briefly run and/or throw grenades before jumping back into the main area? I've got a boss character that needs to briefly do something similar, but the important thing for me is that he is able to jump up onto part of the stage that the player cannot reach and then back down again.
 
The part in which the boss jumps to fence/beam/railing is straight forward but the part of when the boss do that is another story.
I could script something to create this move but for the when part, I'll make it like this: the boss jumps out 2 times when his/her HP hits 2/3 and 1/3.

For your boss, what is the condition for the boss to perform this jump? is it:
a. when HP hits certain limit?
b. when number of active enemies is below certain limit?
c. one of random attacks?
d. something else?
 
The part in which the boss jumps to fence/beam/railing is straight forward but the part of when the boss do that is another story.
I could script something to create this move but for the when part, I'll make it like this: the boss jumps out 2 times when his/her HP hits 2/3 and 1/3.

For your boss, what is the condition for the boss to perform this jump? is it:
a. when HP hits certain limit?
b. when number of active enemies is below certain limit?
c. one of random attacks?
d. something else?
B, where there are zero enemies on the screen. The boss will leap up onto part of the stage ideally where the the player cannot reach them, and then summon reinforcements.
 
Took some modifications to get him to work but I got it right eventually.
Attached below is Rijen, a boss based on PrimeOp's Final Fight thugs. Since he needs special stage and minions for his action, the rar also includes a stage + bg images and minions.
You are going to need to modify some parameters to suit your need, not to mention setting up the stage since a wall is needed for the boss to jump on.

Nonetheless, give Rijen a try.
 

Attachments

Took some modifications to get him to work but I got it right eventually.
Attached below is Rijen, a boss based on PrimeOp's Final Fight thugs. Since he needs special stage and minions for his action, the rar also includes a stage + bg images and minions.
You are going to need to modify some parameters to suit your need, not to mention setting up the stage since a wall is needed for the boss to jump on.

Nonetheless, give Rijen a try.
Thank you so much! It seems to work pretty good so far!

Though I am facing some unusual issues:

The boss doesn't precisely land on the exact same spot all of the time and depending on where he is initially, he sometimes overshoots the jump and lands outside of the stage.

Attached is essentially what I'm working with, the boss being in front of that platform where he's supposed to jump behind. I attempted to add a "barrier" wall, which halfway works, but he's still somehow able to clear it.

(EDIT: Come to think of it, I probably shouldn't have referenced Rolento, but moreso Damnd in this case since I know he perches and stays in one spot)

1725999480236.png
 
Last edited:
Hmm... is he supposed to jump behind the bar or jump on top of the bar?
Also, judging from this, looks like the bar's position is fixed. This might require different function since the one attached above is for relative to screen case.

I probably shouldn't have referenced Rolento, but moreso Damnd in this case since I know he perches and stays in one spot

Yeah, it crossed my mind about Damnd also.
 
Hmm... is he supposed to jump behind the bar or jump on top of the bar?
Also, judging from this, looks like the bar's position is fixed. This might require different function since the one attached above is for relative to screen case.



Yeah, it crossed my mind about Damnd also.

Yea, the bar is fixed. He's supposed to jump exactly on top of it no matter where he is.
 
Sorry for late reply, I was busy making a game for a gamejam.
Back to topic, I've made Dijen which is similar to Rijen but the former jumps to specific coordinates instead.
As usual, you'd need to adjust some parameters to suit your needs.
 

Attachments

Sorry for late reply, I was busy making a game for a gamejam.
Back to topic, I've made Dijen which is similar to Rijen but the former jumps to specific coordinates instead.
As usual, you'd need to adjust some parameters to suit your needs.

Thank you very much for these examples! Also no worries, take as much time as you need, submission looked great btw.

Unfortunately, the issue still persists. I will upload a video of the issue in this post later.

In the meantime, here's my FOLLOW1 anim in case I missed anything:
(Note: the ASMOKE entities contain enemies that are to be spawned in)
Code:
anim follow1
@script
  if(frame==1){
    void self = getlocalvar("self");
    int Direction = getentityproperty(self, "direction");

    changeentityproperty(self, "Subject_to_minz", 0);
  }
  
  if(frame==11){
    void self = getlocalvar("self");

    changeentityproperty(self, "Subject_to_minz", 1);
  }
@end_script
        offset    100 186
    delay 30
    frame    data/chars/B_Angel/jump/0.png
    delay 30
        @cmd    spawn01 "dust" 0 0 0 0
@cmd  targetPos 120 1300 55 198 1 0
    @cmd leap2
    frame    data/chars/B_Angel/jump/1.png
    delay 60
    frame    data/chars/B_Angel/jump/1.png
  
        offset    100 186
        delay 12
    frame    data/chars/B_Angel/kick1/0.png
    delay  30
    offset    71 187
frame    data/chars/B_Angel/dance/0.png
delay 20
frame    data/chars/B_Angel/dance/1.png
delay 7
frame    data/chars/B_Angel/dance/2.png
frame    data/chars/B_Angel/dance/3.png
frame    data/chars/B_Angel/dance/4.png
delay 12
frame    data/chars/B_Angel/dance/5.png
delay 40
sound data/sounds/supermove.wav
@cmd spawn01 "ASmoke" 50 -55 50
@cmd spawn01 "ASmoke" -100 -55 50
frame    data/chars/B_Angel/dance/6.png
delay 12
offset    89 185
    frame    data/chars/B_Angel/kick2/0.png
    offset    89 191
    frame    data/chars/B_Angel/tatsu/1.png
    @cmd    leaper 0 4 0.6
    delay 6
    offset    89 191
    attack.damage.force 30
    attack.position.x 39
    attack.position.y 126
    attack.reaction.fall.force 999
    attack.size.x 100
    attack.size.y 36
    dropv 2 4
        sound data/sounds/tatsu.wav
    frame    data/chars/B_Angel/tatsu/2.png
    offset    89 191
    frame    data/chars/B_Angel/tatsu/5.png
    offset    89 191
    frame    data/chars/B_Angel/tatsu/4.png
    offset    89 191
    frame    data/chars/B_Angel/tatsu/3.png
    offset    89 191
    frame    data/chars/B_Angel/tatsu/2.png
    offset    89 191
    frame    data/chars/B_Angel/tatsu/5.png
    offset    89 191
    frame    data/chars/B_Angel/tatsu/4.png
    offset    89 191
    frame    data/chars/B_Angel/tatsu/3.png
    frame    data/chars/B_Angel/tatsu/2.png
    frame    data/chars/B_Angel/tatsu/5.png
    offset    89 191
    frame    data/chars/B_Angel/tatsu/4.png
    offset    89 191
    frame    data/chars/B_Angel/tatsu/3.png
    offset    89 191
    frame    data/chars/B_Angel/tatsu/2.png
    offset    89 191
    frame    data/chars/B_Angel/tatsu/5.png
    offset    89 191
    frame    data/chars/B_Angel/tatsu/4.png
    offset    89 191
    frame    data/chars/B_Angel/tatsu/3.png
    frame    data/chars/B_Angel/tatsu/2.png
    delay 4
    frame    data/chars/B_Angel/tatsu/1.png
    dropv 0 0
        attack.damage.force 0
    attack.position.x 0
    attack.position.y 0
    attack.reaction.fall.force 0
    attack.size.x 0
    attack.size.y 0
        delay   12
    offset    89 185
    bbox.position.x 77
    bbox.position.y 74
    bbox.size.x 26
    bbox.size.y 111
        @cmd    spawn01 "dust" 0 -20  0 0
    frame    data/chars/B_Angel/kick2/0.png

UPDATE: Here is a video showing what's going on so far. It looks alright at first, but once you see as both the player and the boss are in different positions (starting around 0:50), the boss's position does not land exactly where he was in the first jump
 
Last edited:
I'm really puzzled with this bug. I've tried to reproduce this bug with Dijen but he acts fine.
So I need to ask this: what other actions Angel has aside of jumping to bar to summon ninjas?
 
I'm really puzzled with this bug. I've tried to reproduce this bug with Dijen but he acts fine.
So I need to ask this: what other actions Angel has aside of jumping to bar to summon ninjas?

He has several short, swift jump kick attacks that use seta or @cmd leaper but nothing too complex. He also has a targeted jump that uses a dash and targeting script. His main attack tends to be a Street-Fighter styled tornado kick.

He also has a script that gives him super-armor frames (aka immune to stuns or knockdowns) on FOLLOW1 and his FREESPECIAL (the targeted jump)


Code:
void main()
{
  SuperArmorOnAnim (openborconstant("ANI_FOLLOW1"), openborconstant("ANI_FREESPECIAL"));
}

void SuperArmorOnAnim (int PAnim1, int PAnim2){
    void ent = getlocalvar("self");
    int animation = getentityproperty(ent, "animationid");

    if(animation == PAnim1 || animation == PAnim2){
           changeentityproperty(ent, "nopain", 1);
           changeentityproperty(ent, "nodrop", 2);
           changeentityproperty(ent, "nograb", 1);
    } else {
           changeentityproperty(ent, "nopain", 0);
           changeentityproperty(ent, "nodrop", 0);
           changeentityproperty(ent, "nograb", 0);
    }
}

Here's his header as well, in case I missed anything:


Code:
name B_Angel
type enemy
health  750
score 15000 5
gfxshadow    1
nodieblink 1
riseinv 1
speed   13
nolife 1
falldie 2
aimove avoidx
dust dust dust dust
knockdowncount 30
lifebarstatus        200 10 0 1 0 0 0 0 0
lifeposition        145 250
nameposition        145 240
iconposition        100 230
antigravity 20
defense normal3 1 100
candamage obstacle player npc
script           data/scripts/superarmorAngel.c
remap data/chars/B_Angel/idle/0.png data/chars/B_Angel/pals/1.png
ondrawscript data/scripts/scripts.c
ondrawscript data/scripts/shadowon.c
animationscript data/scripts/egrab.c
animationscript data/scripts/script.c
animationscript data/scripts/escript.c
animationscript data/scripts/harden.c
projectilehit enemy npc obstacle
icon data/chars/B_Angel/icon.png 1
palette data/chars/B_Angel/idle/0.png
diesound data/sounds/die01.wav
load ASmoke
 
Wait, why did you declare multiple animationscripts? one is plenty already, if you know how to combine animation scripts that is.
I've tried to combine multiple before into one via #include/#import (though ig I'm not clear on the difference on those two if there is any), but it led to functions or certain scripts not being recognized anyhow so that was the best way for me to do so at the time. I can do my best to simplify it again though
 
Hmm... try using just one which is this one:
animationscript data/scripts/harden.c

If it crashes, you need to copy missing functions from egrab.c, script.c and escript.c. Do this until all missing functions are copied and try the boss again to see if the issue persists.
 
Hmm... try using just one which is this one:
animationscript data/scripts/harden.c

If it crashes, you need to copy missing functions from egrab.c, script.c and escript.c. Do this until all missing functions are copied and try the boss again to see if the issue persists.
Okay, I will certainly do that and do my best to be more organized with my scripts. Thank you for your support and help thus far by the way!

I will say that I did come up with an alternate solution after I paxploded I a very early version I had of Street Fighter '89. I managed to figure out how Damnd's recruitment animation works. I used it's script as reference and made a very similar script.


Code:
@script
  if(frame==1){
    void self = getlocalvar("self");

    changeentityproperty(self, "Subject_to_minz", 0);
    changeentityproperty(self,"subject_to_screen",0);
  }
  if(frame==1){
       void self = getlocalvar("self");
          float x = getentityproperty(self, "x");
    float z = getentityproperty(self, "z");
    int Tx = 1300;
    int Tz = 180;
    float Vx; float Vz;
          if(Tx < x){
      changeentityproperty(self, "direction", 0);
    } else {
      changeentityproperty(self, "direction", 1);
    }

    Vx = (Tx-x)/(22*4);
    Vz = (Tz-z)/(22*4);

    tossentity(self, 4, Vx, Vz);
  }
    if (frame==3){
        void self = getlocalvar("self");
    changeentityproperty(self, "position", 1300, 185);   
    }
  if(frame==12){
    void self = getlocalvar("self");
 changeentityproperty(self, "position", 1300, 185);
    changeentityproperty(self, "Subject_to_minz", 1);
    changeentityproperty(self,"subject_to_screen",1);
  }
@end_script

Although it does work, I can't help but worry about crediting since I know I did not originally come up with this script/approach and I want to credit @machok if he is still active on this site and have his permission alongside @danno since I know his name is on it too. If not, I can definitely stay committed to your approach @Bloodbane, and just focus on optimizing the script placements in hopes that it works a lot better.
 
Hmmm... that script works similar to script I've made before but it has some redundancies. If that script works without the issues you've posted above, good for you then :)
 
Back
Top Bottom