Stopping an enemy attack from falling down a platform.

PS_VITA

Active member
Hi guys,

I made an attack for this enemy

anim attack2
range  116 600
rangea  0 85
loop 0
delay 11
        offset 77 170
        bbox 60 55 40 100
        jumpframe 1 0 5 0
landframe 4
        dropv 3.5 1.5
frame data/chars/linda5/w4.png
        delay 40
frame data/chars/linda5/a1.png
delay  7
frame data/chars/linda5/a2.png
        attack  90 68 60 34 15 1
        delay  22
frame data/chars/linda5/a3.png
        attack  0 0 0 0 0
        delay  7
        frame data/chars/linda5/a4.png

but the enemy keeps falling down the platforms , is there a way to stop him when he reaches the edges ?
 
PS VITA said:

Well, if YOU lunge yourself over the edge of a cliff does some magical force stop you? There's your answer. Seriously, no there isn't a native function to block movement off a platform. You'll need a script function to monitor the base height and stop the entity's forward momentum before it falls. I'd recommenced you use the onmovex event.

DC
 
That's hilarious!

Lol

Hey DC , what about that edge animation function that I'm
Reading about in the manual, could I maybe reverse the animation using that?
 
PS VITA said:
That's hilarious!

Lol

Hey DC , what about that edge animation function that I'm
Reading about in the manual, could I maybe reverse the animation using that?

You are thinking of Walkoff, and it will not work for this.

DC
 
Damon Caskey said:
PS VITA said:
That's hilarious!

Lol

Hey DC , what about that edge animation function that I'm
Reading about in the manual, could I maybe reverse the animation using that?

You are thinking of Walkoff, and it will not work for this.

DC

I was talking about this  (but I didn't notice that is for players only)


EDGE {players} (6330+)

Optional.This animation is played when the player is on the edge of walls, platforms and holes, as if trying to balance so as not to fall
 
  I don't know if it helps, I only limit enemies from going off platform in these conditions:
1. Preventing them from falling off walls/platforms outside of screen or at least outside of current wait position.
In this condition, as soon as wait is started, 2 invisible blocking platforms are placed offscreen, one to left and the other to the right. The goal is to prevent enemies from falling off walls which can cause them to get stuck offscreen and beyond player's view.
After all enemies are defeated, both blocking platforms are removed.
I've done this in one of levels in Martial Masters mod.

2. Keeping patrolling enemies from leaving the platform they are standing on
This is common feature in platformers especially metroidvanias. There are some enemies who won't leave platform or wall they are standing on despite their patrolling behavior.
You can see some of these enemies in Cherry On Top and Robo Magi.

If your enemy has behavior like in #2, or you have condition like in #1, I can help :)

After rereading the title, there might be other thing we can do: stop or change the attack if it could cause enemy to fall off platform/wall.
So what do you say PS VITA? :)
 
Bloodbane said:
 

After rereading the title, there might be other thing we can do: stop or change the attack if it could cause enemy to fall off platform/wall.
So what do you say PS VITA? :)

That sounds great!
My most recent attempt is that
I ended up making the enemy jump back to the platform after he falls of the platform  via an "anim fallow" that makes the enemy jump back to the platform. This  not what I actually wanted, but it will do for now.

I would not mind placing invisible obstacles that prevent enemies from falling off the edge of a platform,  but I'm not sure how would I make such invisible blocks exclusive to the enemy only.

At the moment,  I'm still learning how script works but I'm struggling.

Thank you.
 
Hey guys,

here's the code for the floor and back wall and the train wagon (platform?)
but the train wagon is not technically a platform I suppose.

wall  0 399 0 0 5899 5899 450 1000 # main back wall
wall  0 657 0 0 5899 5899 247 1000 # main floor
wall  3854 410 0 0 1197 1197 20 180 # train wagon

(I'm not sure if this the way to make 2D stages like mario bros - but it worked for me I guess  ;D)

And this is a made up screen shot of what's happening when the enemy falls
from the train wagon.

index.php


 
Yeah, for such situation, enemies or bosses are better to cancel their attack if it could drop them out like that.

Since it's on a wall, the script should be simple :).
 
Back
Top Bottom