Conveyor belt issue

apescott

Active member
Started a new SOR1 project but having issues with the conveyor belt... I used the same method as SORX mod did but player/enemies get stuck on the edges. It only works when you jump onto it or enemy goes into FALL animation on the belt and bbox resets. What could be causing this? Thank you for the help :)

Here is a video of the issue:


Here are the scripts:

Code:
name            Conveyor
type            none
subtype                 touch
shadow                  0
setlayer                -10
offscreenkill           6000

animationscript    data/scripts/grabscript.c

load            ConveyorS

anim idle
    loop    1
    delay    14
    offset    1 64
        @cmd spawn01 "ConveyorS" 0 0 0
    frame    data/bgs/round_6/conveyor00.png
    frame    data/bgs/round_6/conveyor01.png
    frame    data/bgs/round_6/conveyor02.png

Code:
name            ConveyorS
type            none
shadow                  0
setlayer                -1
candamage player enemy
antigravity             100

animationscript    data/scripts/grabscript.c


anim idle
    loop    1
    delay    42
    offset    1 64
        @cmd dasher 0.2 0 0
    platform 0 126 186 312 64 0.001
        frame    data/chars/misc/empty.gif
        @cmd suicide
    frame    data/chars/misc/empty.gif

grabscript.c (contains dasher) :

Code:
void dasher(float Vx, float Vy, float Vz)
{//Dash with desired speed!
    void self    = getlocalvar("self");
    int dir        = getentityproperty(self,"direction");

    if(dir == 0){Vx = -Vx ;}
    changeentityproperty(self, "velocity", Vx, Vz, Vy);
}
 
Started a new SOR1 project but having issues with the conveyor belt... I used the same method as SORX mod did but player/enemies get stuck on the edges. It only works when you jump onto it or enemy goes into FALL animation on the belt and bbox resets. What could be causing this? Thank you for the help :)

Here is a video of the issue:


Here are the scripts:

Code:
name            Conveyor
type            none
subtype                 touch
shadow                  0
setlayer                -10
offscreenkill           6000

animationscript    data/scripts/grabscript.c

load            ConveyorS

anim idle
    loop    1
    delay    14
    offset    1 64
        @cmd spawn01 "ConveyorS" 0 0 0
    frame    data/bgs/round_6/conveyor00.png
    frame    data/bgs/round_6/conveyor01.png
    frame    data/bgs/round_6/conveyor02.png

Code:
name            ConveyorS
type            none
shadow                  0
setlayer                -1
candamage player enemy
antigravity             100

animationscript    data/scripts/grabscript.c


anim idle
    loop    1
    delay    42
    offset    1 64
        @cmd dasher 0.2 0 0
    platform 0 126 186 312 64 0.001
        frame    data/chars/misc/empty.gif
        @cmd suicide
    frame    data/chars/misc/empty.gif

grabscript.c (contains dasher) :

Code:
void dasher(float Vx, float Vy, float Vz)
{//Dash with desired speed!
    void self    = getlocalvar("self");
    int dir        = getentityproperty(self,"direction");

    if(dir == 0){Vx = -Vx ;}
    changeentityproperty(self, "velocity", Vx, Vz, Vy);
}
Hi friend. In case you are using the SOR2X method, there's a "onblockpscript" in every character that instantly moves them over the conveyor as soon as a platform collision is detected.

However, in the most recent SORX versions I replaced this method with a "basemap" over the whole level. This way we don't need to use the "onblockpscript" anymore since the level ground is on the same height of the platforms (using the value of 0.001) but still preserve the movement.

basemap 0 300 2400 200 0.001 0.001

name St7_Conveyor1
type none
shadow 0
setlayer -10
animationscript data/scripts/animation/default.c

load St7_Conveyor1S

anim idle
loop 1
delay 14
offset 1 32
@cmd spawn01 "St7_Conveyor1S" 0 0 0
frame data/bgs/sor2/st7a/conveyor00.png
frame data/bgs/sor2/st7a/conveyor01.png
frame data/bgs/sor2/st7a/conveyor02.png

name St7_Conveyor1S
type none
shadow 0
antigravity 100
setlayer -1
animationscript data/scripts/animation/default.c

anim idle
loop 0
delay 42
offset 1 32
@cmd dasher 0.2 0 0
platform 52 -10 288 226 32 0.001
frame data/bgs/sor2/st7a/_empty.png
@cmd suicide
frame data/bgs/sor2/st7a/_empty.png

PS: Nice game by the way :)
 
Hi friend. In case you are using the SOR2X method, there's a "onblockpscript" in every character that instantly moves them over the conveyor as soon as a platform collision is detected.

However, in the most recent SORX versions I replaced this method with a "basemap" over the whole level. This way we don't need to use the "onblockpscript" anymore since the level ground is on the same height of the platforms (using the value of 0.001) but still preserve the movement.







PS: Nice game by the way :)
Thanks my friend! Basemap fixed it!!! :D Glad you like it so far I will have a playable demo of rounds 1 and 2 uploaded within the hour :D thanks again for the help!
 
Back
Top Bottom