Respawn Bug Using Direction LeftRight

maxman

Well-known member
I'm using v3 6391 and direction 'both' really works when the player respawns after dying (without anim respawn). But when I use direction leftright and all of a sudden, the player dies with 3 lives above the ground, after spawning at the center in the very beginning. The engine bug kills the player from respawning. Therefore, it results to losing one credit and each time you press start for continuing, it kills you again until you run out of credits and then game over.

Here's the respawn entity where player respawns from.

C:
name        Respawn
type        none
offscreenkill    3000
antigravity    100


anim idle
@script
    void self = getlocalvar("self");
    int x = getentityproperty(self,"x");
    int a = getentityproperty(self,"a");

    setindexedvar(0, x);
    setindexedvar(1, a);
    killentity(self);
@end_script
    loop    1
    delay    5
    offset    1 1
    frame    data/chars/misc/empty.gif

In one level, here I respawn with this. Both is no problem, but leftright.

C:
spawn    Respawn
@script
void main()
{
    void P1 = getplayerproperty(0, "entity");

    changeopenborvariant("xpos", 580);
    changeopenborvariant("ypos", 2000);
    changeentityproperty(P1,"position", 740, NULL(), 1);
    changeentityproperty(P1,"direction", 0);
}
@end_script
coords 740 2137 1
flip 1
at 0

I don't understand how that respawn thing doesn't work well with leftright. How can the respawning issue be resolved for leftright to work?
 
940x2203 pixels. That's the panel size. z limit is z 2137 2137. You start with xpos variant of 580 and ypos variant of 2000 with a specific position in the very beginning.

After the player dies and you press start to continue, the camera starts to pan right to where the player is supposed to respawn, but it cuts short by stopping the camera from panning right to the player's respawn before actually respawning.
 
Back
Top Bottom