Bug with Moving Objects
#1

Hey. Today I got the idea to do parkour zone with moving objects. After I wrote the script the first test showed a very sad bug (not of mine).

Just watch the video:
[ame]www.youtube.com/watch?v=B35PLhVBxts[/ame]

I am very upset that I had spent time in vain and I hope that this will be fixed...

Code of objects from the video:
pawn Код:
new ParkourObjects[10], bool:ParkourObjMoved[10];

public OnGameModeInit()
{
    ParkourObjects[0] = CreateObject(2633, 1743.3, -2997.2, 28.4, 0.0, 0.0, 90.0); //Start
    ParkourObjects[1] = CreateObject(1698, 1748.1, -2997.2, 30.0, 0.0, 0.0, 0.0); //Step 1
    ParkourObjects[2] = CreateObject(1698, 1751.3, -3001.6, 30.5, 0.0, 0.0, 0.0); //Step 2
    MoveObject(ParkourObjects[2], 1751.3, -2992.9, 30.5, 1.5);
    ParkourObjects[3] = CreateObject(1698, 1754.8, -2992.9, 32.3, 0.0, 0.0, 0.0); //Step 3
    MoveObject(ParkourObjects[3], 1754.8, -3001.6, 32.3, 3.0);
    ParkourObjects[4] = CreateObject(1698, 1759.0, -2995.5, 35.7, 0.0, 0.0, 0.0); //Step 4
    MoveObject(ParkourObjects[4], 1759.0, -2989.9, 35.7, 4.5);
    ParkourObjects[5] = CreateObject(1698, 1759.0, -2998.9, 35.7, 0.0, 0.0, 0.0); //Step 4
    MoveObject(ParkourObjects[5], 1759.0, -3004.6, 35.7, 4.5);
    ParkourObjects[6] = CreateObject(1698, 1763.5, -2993.8, 39.7, 0.0, 0.0, 0.0); //Step 5
    MoveObject(ParkourObjects[6], 1763.5, -2986.8, 39.7, 7.0);
    ParkourObjects[7] = CreateObject(1698, 1763.5, -2997.2, 39.7, 0.0, 0.0, 0.0); //Step 5
    MoveObject(ParkourObjects[7], 1766.2, -2997.2, 39.7, 1.5);
    ParkourObjects[8] = CreateObject(1698, 1763.5, -3006.6, 39.7, 0.0, 0.0, 0.0); //Step 5
    MoveObject(ParkourObjects[8], 1763.5, -3000.6, 39.7, 7.0);
    ParkourObjects[9] = CreateObject(8572, 1769.8, -2997.2, 42.1, 0.0, 0.0, 0.0); //Finish
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp("/parkour", cmdtext, true)) return cmd_parkour(playerid);
    return 0;
}

forward cmd_parkour(playerid);
public cmd_parkour(playerid)
{
    SetPlayerPos(playerid, 1742.9774, -2997.2134, 31.5258);
    SetPlayerFacingAngle(playerid, 270.0);
    return 1;
}

public OnObjectMoved(objectid)
{
    if(objectid == ParkourObjects[2])
    {
        if(ParkourObjMoved[2])
        {
            ParkourObjMoved[2] = false;
            MoveObject(ParkourObjects[2], 1751.3, -2992.9, 30.5, 1.5);
        }
        else
        {
            ParkourObjMoved[2] = true;
            MoveObject(ParkourObjects[2], 1751.3, -3001.6, 30.5, 1.5);
        }
    }
    else if(objectid == ParkourObjects[3])
    {
        if(ParkourObjMoved[3])
        {
            ParkourObjMoved[3] = false;
            MoveObject(ParkourObjects[3], 1754.8, -3001.6, 32.3, 3.0);
        }
        else
        {
            ParkourObjMoved[3] = true;
            MoveObject(ParkourObjects[3], 1754.8, -2992.9, 32.3, 3.0);
        }
    }
    else if(objectid == ParkourObjects[4])
    {
        if(ParkourObjMoved[4])
        {
            ParkourObjMoved[4] = false;
            MoveObject(ParkourObjects[4], 1759.0, -2989.9, 35.7, 4.5);
        }
        else
        {
            ParkourObjMoved[4] = true;
            MoveObject(ParkourObjects[4], 1759.0, -2995.5, 35.7, 4.5);
        }
    }
    else if(objectid == ParkourObjects[5])
    {
        if(ParkourObjMoved[5])
        {
            ParkourObjMoved[5] = false;
            MoveObject(ParkourObjects[5], 1759.0, -3004.6, 35.7, 4.5);
        }
        else
        {
            ParkourObjMoved[5] = true;
            MoveObject(ParkourObjects[5], 1759.0, -2998.9, 35.7, 4.5);
        }
    }
    else if(objectid == ParkourObjects[6])
    {
        if(ParkourObjMoved[6])
        {
            ParkourObjMoved[6] = false;
            MoveObject(ParkourObjects[6], 1763.5, -2986.8, 39.7, 7.0);
        }
        else
        {
            ParkourObjMoved[6] = true;
            MoveObject(ParkourObjects[6], 1763.5, -2993.8, 39.7, 7.0);
        }
    }
    else if(objectid == ParkourObjects[7])
    {
        if(ParkourObjMoved[7])
        {
            ParkourObjMoved[7] = false;
            MoveObject(ParkourObjects[7], 1766.2, -2997.2, 39.7, 1.5);
        }
        else
        {
            ParkourObjMoved[7] = true;
            MoveObject(ParkourObjects[7], 1763.5, -2997.2, 39.7, 1.5);
        }
    }
    else if(objectid == ParkourObjects[8])
    {
        if(ParkourObjMoved[8])
        {
            ParkourObjMoved[8] = false;
            MoveObject(ParkourObjects[8], 1763.5, -3000.6, 39.7, 7.0);
        }
        else
        {
            ParkourObjMoved[8] = true;
            MoveObject(ParkourObjects[8], 1763.5, -3006.6, 39.7, 7.0);
        }
    }
    return 1;
}
Reply
#2

Yep, this also ruined my parkour game. It was a tower (50 cubes high, 4x4) of moving cubes that moved, the goal was to reach the top. Unfortunately this bug ruined that and a few of my other scripts.

However, since it's a GTA bug not a SA-MP bug, it's very highly unlikely to be fixed.
Reply
#3

How'd the bug actually come about Crayder? What was added at the time, maybe that could be made an optional thing to allow parkour to happen again...


That actually was one of the gamemodes I found to be interesting due to it being different.
Reply
#4

Quote:

How'd the bug actually come about Crayder? What was added at the time, maybe that could be made an optional thing to allow parkour to happen again...

I don't recall, it has been here since I came back in 2012, that's when I first started seriously trying to script. This was one of the first scripts I was actually going for, but the dream was destroyed by this bug!
Quote:

That actually was one of the gamemodes I found to be interesting due to it being different.

I never released this one... Perhaps you're thinking of one of the other ones I made with the colorful 0.3.7 cubes, the maze and the lego box. And now that I think about it both of those were also affected by this! The maze was actually being designed to be dynamically changed when checkpoints were reached (like, when you beat one maze it would morph into another), but since while the blocks were moving the players could abuse this bug to glitch through the ground blocks. And in the lego box there were always 10 blocks moving up or down.
Reply
#5

Nah, the old hay gamemode servers was what I was meaning.

This would severely break them.
Reply
#6

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
Nah, the old hay gamemode servers was what I was meaning.

This would severely break them.
That's where I got the idea! Mine was better... :P

Obviously this bug wasn't always here, I'm not the only one that used to play those...
Reply
#7

This is caused by the object surfing code of SAMP. You can sometimes successfully climb objects while moving if you hold a direction key (like on vehicles) if it is not moving too fast.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)