Zombies climbing over poles.
#9

It's probably caused by FCNPC internal behaviour, let's discard an option:

Код:
new Float:x,Float:y,Float:z; 
             FCNPC_GetPosition(npcid,x,y,z);
printf("Debug 1 > %f", z); 
             new Float:px, Float:py; 
             new Float:p,Float:p1,Float:p2; 
             GetPlayerPos(playerid,p,p1,p2); 
             GetPointInFront2D(x,y,FCNPC_GetAngle(npcid),1.0,px,py); 
         
             //  Check collision 
             if(IsBetweenElementToPointIsWall(px,py,z,npcid,item_fcnpc) || IsPointInWaterOrientOfElement(npcid,item_fcnpc,3.0,o_front)) 
             { 
                FCNPC_SetAngle(npcid, RandomFloat(0.0,360.0)); 
             } 
             else // No collision, move. 
             { 
                      new rand = random(3); 
                    switch(rand) 
                    { 
                       case 0: FCNPC_GoTo(npcid,  px, py, z, MOVE_TYPE_WALK, 0.1); 
                       case 1: FCNPC_GoTo(npcid,  px, py, z, MOVE_TYPE_WALK, 0.2); 
                       case 2: FCNPC_GoTo(npcid,  px, py, z, MOVE_TYPE_WALK, 0.3); 
                       case 3: FCNPC_GoTo(npcid,  px, py, z, MOVE_TYPE_WALK, 0.4); 
                    }
printf("Debug 2 > %f", z);
If there is a difference between debug 1 and debug 2 then a function is internally changing the Z variable. Otherwise, FCNPC internal movement process automatically sets the NPC to the highest Z (like mapandreas).
Reply


Messages In This Thread
Zombies climbing over poles. - by StrikerZ - 29.09.2017, 15:49
Re: Zombies climbing over poles. - by Bigwebicek - 29.09.2017, 15:52
Re: Zombies climbing over poles. - by StrikerZ - 29.09.2017, 15:54
Re: Zombies climbing over poles. - by whadez - 29.09.2017, 16:07
Re: Zombies climbing over poles. - by AbyssMorgan - 29.09.2017, 16:20
Re: Zombies climbing over poles. - by StrikerZ - 29.09.2017, 16:38
Re: Zombies climbing over poles. - by Marricio - 29.09.2017, 18:45
Re: Zombies climbing over poles. - by StrikerZ - 30.09.2017, 06:00
Re: Zombies climbing over poles. - by Marricio - 30.09.2017, 15:11

Forum Jump:


Users browsing this thread: 2 Guest(s)