Solved Hole Altitude settings, how do they work?

Question that is answered or resolved.

PS_VITA

Active member
Hi,
I'm trying to change the altitude of a hole the higher the player climbs up on a stage,I have everything working except the altitude for the hole won't change.

hole 190 6300 0 0 3700 3700 5000 0
( changed via script)

hole 190 6300 0 0 3700 3700 5000 2000


I'm running openbor v3.0 build from Aug 29 2018

Even if I just create a hole from the level txt with say 500 altitude, I'm not really seeing the difference.
 
I meant the edited Stage 2-B which is the building where you climb up the ladder and you see the conveyor belts running in two ways. Take a look at the 2-4 edited stages for that. I think the entities could be movezblo, moveyblo, and movezblo2.

Code:
set    STORY
skipselect billy billy
equalairpause 0
noslowfx 1
maxplayers 2
nosame    0 1
credits 30
custfade 50
z 297 495
file      data/levels/st1/st1.txt # Stage 1
z 729 882
file      data/levels/st2/st2.txt # Stage 2
z 996 1306
file      data/levels/st2b/st2b.txt # Stage 3 / Stage 2-B
z 798 1286
file      data/levels/st3a/st3a.txt # Stage 4 / Stage 3-A
z 260 600
file      data/levels/st3/st3.txt # Stage 5 / Stage 3
z 936 1333
file      data/levels/st4/st4e.txt # Stage 6 / Stage 4-E
z 484 900
file      data/levels/st5a/st5a.txt # Stage 7 / Stage 5-A
z 384 697
file      data/levels/st5/st5.txt # Stage 8 / Stage 5
checked and those are just entities that create platforms?
 
Sorry I was wrong. It's not stage 5, it's stage 4.

Look at these in the character header.

Code:
name    movezblo
type    obstacle
cantgrab 1
health        10
shadow  0
grabdistance 600
offscreenkill 6000
subject_to_gravity 0
subject_to_hole 0
subject_to_wall 0
nolife  1
noatflash 1

anim idle
    loop    1
    delay    5
    offset    1 1
      platform   0 0 0 0 5080 5080 1 5000
      frame  data/chars/misc/empty.gif

anim fall
    loop    1
    delay    5
    offset    1 1
      frame  data/chars/misc/empty.gif
 
I guess my new question is how can I mimic the way a player dies when falling into a hole?

By mimic I mean what does that look like in code?

edit: As in the player simply disappears and respawns if he still has a life left.
Same as DC said, the pit death is a simple attack damage (ATK_PIT) triggered at a defined Y height and does a damage equal to the remaining hp.
Once the character is falling, the height limit is a negative value.

Here's the code:
C:
#define        PIT_DEPTH            -250

// fall into a pit
if(self->position.y < PIT_DEPTH)
{
    if(!self->takedamage)
    {
        kill_entity(self);
    }
    else
    {
        attack          = emptyattack;
        attack.dropv    = default_model_dropv;
        attack.attack_force = self->energy_state.health_current;
        attack.attack_type  = ATK_PIT;
        self->takedamage(self, &attack, 0);
    }
    return 1;
}
 
Same as DC said, the pit death is a simple attack damage (ATK_PIT) triggered at a defined Y height and does a damage equal to the remaining hp.
Once the character is falling, the height limit is a negative value.

Here's the code:
C:
#define        PIT_DEPTH            -250

// fall into a pit
if(self->position.y < PIT_DEPTH)
{
    if(!self->takedamage)
    {
        kill_entity(self);
    }
    else
    {
        attack          = emptyattack;
        attack.dropv    = default_model_dropv;
        attack.attack_force = self->energy_state.health_current;
        attack.attack_type  = ATK_PIT;
        self->takedamage(self, &attack, 0);
    }
    return 1;
}
Thank you ,this is a good start for me to come up with a script that works similar. I will review this thread and come up with a solution.


Thanks again everyone!

edit:

I might just make an invisible entity with a large attackbox that damages all players and enemies with a large amount of power (say 2000) that keeps looping really fast.

And just continue to move it by adjusting the position as the player goes higher and higher via script.
 
Last edited:
Back
Top Bottom