Stomp move

O Ilusionista

Captain 100K
How do I make a stomp move?
The char is on the air and uses jumpattack2 but I want that when he touches the ground, he stay on the ground for a longer time (so I can't just change the jumpland anim). Plus, I would like to make the enemies, which was hit by this move, to bounce on air higher than the normal.

Its possible? I tried with jumpland, but the char ignores it.

anim jumpattack2
loop 0
delay 6
otg 1
offset 89 136
bbox 74 61 37 75
jumpland 3
sound data/chars/hulk/att3.wav
bbox 62 48 35 56
frame data/chars/hulk/JA21.pcx
bbox 71 61 37 75
frame data/chars/hulk/JA22.pcx
bbox 71 61 37 72
@cmd velo001 2.5 0 -2.5
attack 86 76 40 56 30 1 0 0 0 10
dropv -1.5 8
staydown 150 150
frame data/chars/hulk/JA24.pcx
delay 60
frame data/chars/hulk/JA24.pcx
 
What a coincidence you are talking about Hulk. I modified Hulk from Marvel First Alliance demo some time ago adding jumping ground quake.

Here's his JUMPATTACK2:

anim jumpattack2
@script
    void self = getlocalvar("self");

    if(frame==0){
      changeentityproperty(self, "aiflag", "jumping", 0);
      changeentityproperty(self, "aiflag", "attacking", 1);
    } else if(frame==13){
      setidle(self, openborconstant("ANI_IDLE"));
    }
@end_script
offset 70 125
delay 10
landframe 5
quakeframe 7 6 5
bbox 45 20 50 95
frame data/chars/Hulk/ja1.png
delay 6
bbox 56 35 40 95
sound data/sounds/vuu3.wav
attack 75 30 55 40 15 7 0 0 7 0
frame data/chars/Hulk/ja2.png
delay 6
bbox 50 48 50 70
attack 75 75 40 45 15 7 0 0 7 0
frame data/chars/Hulk/ja4.png
delay 10
frame data/chars/Hulk/ja5.png
delay 200
attack 75 75 40 45 20 7 0 0 10 0
frame data/chars/Hulk/ja5.png
delay 4
bbox 54 90 68 50
offset 80 130
frame data/chars/Hulk/s2.png
sound data/sounds/quake.wav
@cmd shooter "ShWave" 0 0 0 0 0 -1 1
@cmd shooter "ShWave" 0 0 0 0 0 1 1
frame data/chars/Hulk/s3.png
frame data/chars/Hulk/s4.png
frame data/chars/Hulk/s5.png
attack 0 0 0 0 0 0 0 0 0 0
frame data/chars/Hulk/s6.png
frame data/chars/Hulk/s7.png
frame data/chars/Hulk/s8.png
delay 7
offset 90 125
frame data/chars/Hulk/g5.png
frame data/chars/Hulk/g5.png

When this attack is performed, Hulk technically ends his jumping state and enters attack mode. Because of this, when he lands he doesn't change to JUMPLAND or any animation to be exact and continues the animation to end.

Yes, 2 shooter functions there are for creating earthquake.

I forced Hulk to revert to IDLE at end of animation cause for some reason, he's stuck in this animation.
 
Not sure but maybe it happens because there is missing the "loop" command.
I may be wrong, but if you don't set Loop it automatically understand "Loop 0"

If i got it right,you can control the enemies fall reaction,just by using the dropv command as you do and the bouncefactor command.

Ah, thanks. I wasn't aware that this command could be set for a single attack, thanks.

Code:
bouncefactor {r}

~This command determines bounce effect after touching ground while falling to ground. It works even if entity is falling while playing non-FALL animation.
~{r} is bounce ratio which controls bounce effect. If it's set to 1, entity will bounce forever. If it's set to 2, it will bounce longer than normal. Any bigger value has slight difference.
~Normally this is used in FALL animation however it also works with other animations.
~This command won't have any effect if 'bounce' (see above) is set to 0.
 
Ops, its wrong:

bouncefactor makes HULK to bounce. And I would like to make THE ENEMY to bounce.
There isn't a way to not make a new fall animation (to all chars...) just to add the bounce?

Edit:

I tried with script, but seams that I can't change bouncefactor using script

void bouncer(float fBounce)
{ // make the target bounce
  void self = getlocalvar("self");
  void target = getlocalvar("Target" + self);

  if(target==NULL())
  {
    target = getentityproperty(self, "opponent");
    setlocalvar("Target" + self, target);
  }
  if(target!=NULL())
  {
    changeentityproperty(target, "bouncefactor", fBounce);
  }
}
Log:
Code:
Property name 'bouncefactor' is not supported by function getentityproperty.
Script compile error in 'animationscript': changeentityproperty line 268, column 5

Also, a suggestion to the OpenBOR coders: target bouncefactor should be hardcoded into dropv function, makes more sense to control the target using this.

Something like

Code:
dropv {height} {speedx} {speedz} {bouncefactor}
 
I don't know of direct way but you can try using different attacktype for this move. Enemies have corresponding FALL animation with 'bouncy' bouncefactor to make them bounce higher when this animation is played.
 
I was playing with this until I figured that my Shooter funciton is different from this example.

But there is something funny. The script accepts only 6 values, not 7:
Code:
void shooter(void Shot, float dx, float dy, float dz, float Vx, float Vy, float Vz)

And at your example:
@cmd  shooter "ShWave" 0 0 0 0 0 -1 1
  @cmd  shooter "ShWave" 0 0 0 0 0 1 1

I want to spaw those effects one for each direction, but both goes to the same direction (foward).
What can be wrong?
 
I think i understand "Stomp move" correctly, and trying to make one, an attack, when enemy jumps in air and drop fast on the player, like smashing him:

anim freespecial2
#stomp jump
hitfx data/sounds/P1.wav
range 0 240
rangez -130 130
offset 365 375
delay 10
frame  data/chars/enemy/q/102.gif
@cmd degravity 1
frame  data/chars/enemy/q/123.gif
@cmd dasher 0 27 0
offset  365  475
frame  data/chars/enemy/q/124.gif
frame  data/chars/enemy/q/124.gif
@cmd stop
@cmd tdash 1 10
frame  data/chars/enemy/q/124.gif
@cmd dash
frame  data/chars/enemy/q/124.gif
@cmd stop
frame  data/chars/enemy/q/124.gif
@cmd dasher 0 -13.5 0
frame  data/chars/enemy/q/156.gif
frame  data/chars/enemy/q/156.gif
frame  data/chars/enemy/q/156.gif
frame  data/chars/enemy/q/156.gif
delay 100
@cmd stop
frame  data/chars/enemy/q/125.gif
delay 10
offset  365  375
frame  data/chars/enemy/q/126.gif
frame  data/chars/enemy/q/127.gif
@cmd degravity -0.4
delay 250
        bbox 331 71 70 301
frame  data/chars/enemy/q/102.gif

As you see, first of all i set @cmd degravity 1 (this means that enemy have no gravity, right?) Then i use dasher with 27 y velocity, this means that during next 2 frames he will move up exactly 540 px (jump). Then enemy stops, find nearest target and dash above him during 1 frame (instantly). And then i use dasher with -13.5 y velocity to make him move down (drop on player) during 4 frames exactly on 540 px back. Stay on the ground (delay 100) and the put gravity back (enemy have antigravity -40 set in the header, so setting @cmd degravity -0.4 will put it back, am i correct?). But the problem is that during using 2nd dasher with -13.5 y velocity to make him move down (drop on player), enemy stops in midair (maybe in half of the height he jumps previously), wait 1 second (delay 100) and then degravity -0.4 applies and he falls on the ground. What is the porblem?
 
for sure @cmd  degravity -0.4 is the exactly same as antigravity -40. Both means gravity 40.

Ok, thank you, magggas, i was right)

The problem is when enemy must dash back to the ground from air, he stops movement (or something stops it) in half way to the ground, but mathematically all is right, i guess.
 
Have playing with this problem and did not find a solution. What can stop the enemy from moving toward the ground?

anim    freespecial2
#stomp jump
  hitfx  data/sounds/P1.wav
  range  0 240
  rangez  -130 130
  offset  365 375
  delay  10
  frame  data/chars/enemy/q/102.gif
  @cmd  degravity 1
  frame  data/chars/enemy/q/123.gif
  @cmd  dasher 0 27 0
  offset  365  475
  frame  data/chars/enemy/q/124.gif
  frame  data/chars/enemy/q/124.gif
  @cmd  stop
  @cmd  tdash 1 10
  frame  data/chars/enemy/q/124.gif
  @cmd  dash
  frame  data/chars/enemy/q/124.gif
  @cmd  stop
  frame  data/chars/enemy/q/124.gif
  @cmd  dasher 0 -13.5 0
  frame  data/chars/enemy/q/156.gif
  frame  data/chars/enemy/q/156.gif
  frame  data/chars/enemy/q/156.gif
  frame  data/chars/enemy/q/156.gif

  delay  100
  @cmd  stop
  frame  data/chars/enemy/q/125.gif
  delay  10
  offset  365  375
  frame  data/chars/enemy/q/126.gif
  frame  data/chars/enemy/q/127.gif
  @cmd  degravity -0.4
  delay  250
          bbox  331 71 70 301
  frame  data/chars/enemy/q/102.gif

I noticed that if i change velocity it is not affect on anything, not speed, nor movement height.
But if change number of frames from 4 to saying 8 it will affect on movement height, with 8 frames enemy will move down a bit further. But anyways i cant get why enemy cant move down and stops in midair even if he have antigravity (for comparison, decoration entity with the same animation makes it move up and then down to the ground without a problem)?
 
So, ok, i think i found a problem:

anim    freespecial2
#stomp jump
  hitfx  data/sounds/P1.wav
  range  0 240
  rangez  -130 130
  offset  365 375
  delay  10
  frame  data/chars/enemy/q/102.gif
  @cmd  degravity 1
  frame  data/chars/enemy/q/123.gif
  @cmd  dasher 0 27 0
  offset  365  475
  frame  data/chars/enemy/q/124.gif
  frame  data/chars/enemy/q/124.gif
  @cmd  stop
  @cmd  tdash 1 10
  frame  data/chars/enemy/q/124.gif
  @cmd  dash
  frame  data/chars/enemy/q/124.gif
  @cmd  stop
  frame  data/chars/enemy/q/124.gif
  @cmd  dasher 0 -13.5 0
  frame  data/chars/enemy/q/156.gif
  frame  data/chars/enemy/q/156.gif
  frame  data/chars/enemy/q/156.gif
  frame  data/chars/enemy/q/156.gif
  delay  100
  @cmd  stop
  frame  data/chars/enemy/q/125.gif
  delay  10
  offset  365  375
  frame  data/chars/enemy/q/126.gif
  frame  data/chars/enemy/q/127.gif
  @cmd  degravity -0.4
  delay  250
          bbox  331 71 70 301
  frame  data/chars/enemy/q/102.gif

If remove   @cmd  stop the enemy will fall on the ground, so the problem is   @cmd  dasher 0 -13.5 0 dont want to work to move enemy from air toward ground. Maybe there is solution?
 
If remove    @cmd  stop the enemy will fall on the ground,

IMO that's funny since you declared degravity 1 couple frames before.
Anyways, it's engine rule that gravity takes priority over downward velocity. Something must have restored gravity at that frame. This might be the reason the next dasher function doesn't work
So the solution is set another degravity function to nullify gravity

BTW I remember that in some builds, downward velocity is limited to -6. I'm going to check if that limit has been removed in newer builds
 
Something must have restored gravity at that frame. This might be the reason the next dasher function doesn't work

It is weird because i use dasher for moving up ad down many decorations (none type entities) in my mod in the same way. First set a degravity, then dasher: up or down, same result, all works perfectly.
 
Back
Top Bottom