Pamdex Pathfinder and streamer(objects)
#1

Hi everyone,

I finally got Pamdex's pathfinder to work with my NPC system.
It works perfect for samp default objects but it does not for custom placed objects.
Note: I do not know if this applies for dynamic one's only as I don't use statics but my assumption is that it doesn't work with streamer objects because they aren't static.

Does anyone know a work around for this? To make the pathfinder also calculate paths around streamed objects?

My code:
pawn Code:
//Chase player , playerid is zombie playerid
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
PathFinder_FindWay(playerid, x, y, pos[0], pos[1]);  // Pos[] holds the value of the victim's position

public OnPathCalculated(routeid, success, Float:nodesX[], Float:nodesY[], Float:nodesZ[], nodesSize)
{
    if(success)
    {
        RNPC_CreateBuild(routeid,PLAYER_RECORDING_TYPE_ONFOOT);
        for(new i; i < nodesSize; i++)
        {
            ApplyAnimation(routeid,"RYDER","RYD_DIE_PT1",4.1,1,1,1,1,1);
            RNPC_AddMovement(nodesX[i], nodesY[i], nodesZ[i]+0.3, nodesX[i+1], nodesY[i+1], nodesZ[i+1]+0.3, RNPC_SPEED_WALK);
        }
        RNPC_FinishBuild();
        RNPC_StartBuildPlayback(routeid);
    }
    return 1;
}
Reply


Messages In This Thread
Pamdex Pathfinder and streamer(objects) - by jasperschellekens - 27.05.2020, 14:47
Re: Pamdex Pathfinder and streamer(objects) - by Dignity - 27.05.2020, 20:08
Re: Pamdex Pathfinder and streamer(objects) - by jasperschellekens - 28.05.2020, 11:38
Re: Pamdex Pathfinder and streamer(objects) - by NaS - 28.05.2020, 16:43
Re: Pamdex Pathfinder and streamer(objects) - by jasperschellekens - 29.05.2020, 12:14
Re: Pamdex Pathfinder and streamer(objects) - by NaS - 30.05.2020, 17:23

Forum Jump:


Users browsing this thread: 2 Guest(s)