Move Object instantly
#1

Hello i facing problem with move object , for real i dont want to move i want to rotate everything works fine excepts speed i set speed to 0.0001 but it still do it instantly no animation the object i want to rotate is barrierturn hare is my code :
Code:
 else if(IsPlayerInRangeOfPoint(playerid, 2.0,49.4500000,-1534.1100000,5.0000000))//Pasienis 1 uztvara
        {
            if(Used[playerid] == 0)
            {

            MoveDynamicObject(Uztvara[0],49.4500000,-1534.1100000,5.0000000,0.0001,0.0,0.0,84.5000000);
            SendClientMessage(playerid, 0xFFFFFFFF, "Uztvara atidaryta!"); //open 
            Used[playerid] = 1;
            return 1;

            }
            if(Used[playerid] == 1)
            {
            MoveDynamicObject(Uztvara[0],49.4500000,-1534.1100000,5.0000000,0.0001,0.0000000,270.0000000,84.5000000);
            SendClientMessage(playerid, 0xFFFFFFFF, "Uztvara uzdaryta!"); //close
            Used[playerid] = 0;
            return 1;

            }

        }
Reply
#2

I think the problem is with speed...

PHP Code:
else if(IsPlayerInRangeOfPoint(playerid2.0,49.4500000,-1534.1100000,5.0000000))//Pasienis 1 uztvara
        
{
            if(
Used[playerid] == 0)
            {
            
MoveDynamicObject(Uztvara[0],49.4500000,-1534.1100000,5.0000000,1,0.0,0.0,84.5000000);
            
SendClientMessage(playerid0xFFFFFFFF"Uztvara atidaryta!"); //open 
            
Used[playerid] = 1;
            return 
1;
            }
            if(
Used[playerid] == 1)
            {
            
MoveDynamicObject(Uztvara[0],49.4500000,-1534.1100000,5.0000000,1,0.0000000,270.0000000,84.5000000);
            
SendClientMessage(playerid0xFFFFFFFF"Uztvara uzdaryta!"); //close
            
Used[playerid] = 0;
            return 
1;
            }
        } 
Reply
#3

The object still needs to be actually moved. Only adjusting the rotation does not work. Move up/down by 0.01 or something. I would also recommend storing the coordinates in a constant variable or something so you don't have to copy a set of coordinates 4 times.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)