Not work SetActorFacingAngle
#1

PHP код:
GetActorFacingAngle(i,A);
SetActorFacingAngle(i,A+90); 
Why not work?

SetActorFacingAngle - change angle, BUT SKIN NOT SPINNING. WHY
Reply
#2

Are you making A a float?

pawn Код:
new Float:A;
Reply
#3

PHP код:
new Float:A;
for(new 
0counti++)
{
    
GetActorFacingAngle(i,A);
    
SetActorFacingAngle(i,A+90);

Reply
#4

PHP код:
new Float:A;
GetActorFacingAngle(0,A);
SetActorFacingAngle(0,A+90); 
not work too.
Reply
#5

PHP код:
new Float:A;
GetPlayerFacingAngle(playerid,A);
for(new 
0counti++)
{
    
SetActorFacingAngle(i,A+90);

That code will get the player facing angle then add 90 degrees to that.

Or you could do this

PHP код:
new Float:A+90;
GetPlayerFacingAngle(playerid,A);
for(new 
0counti++)
{
    
SetActorFacingAngle(i,A);

Reply
#6

PHP код:
new Float:A;
SetPlayerFacingAngle(playerid,180);
for(new 
0counti++)
{
    
GetActorFacingAngle(i,A);
    
SetActorFacingAngle(i,180);

not work
Reply
#7

Quote:
Originally Posted by ihatetn931
Посмотреть сообщение
PHP код:
new Float:A;
GetPlayerFacingAngle(playerid,A);
for(new 
0counti++)
{
    
SetActorFacingAngle(i,A+90);

That code will get the player facing angle then add 90 degrees to that.

Or you could do this

PHP код:
new Float:A+90;
GetPlayerFacingAngle(playerid,A);
for(new 
0counti++)
{
    
SetActorFacingAngle(i,A);

Not work
Reply
#8

Quote:
Originally Posted by DarkPower2
Посмотреть сообщение
PHP код:
new Float:A;
SetPlayerFacingAngle(playerid,180);
for(new 
0counti++)
{
    
GetActorFacingAngle(i,A);
    
SetActorFacingAngle(i,180);

not work
In that code A is not doing anything but storing the actor facing angle which you're not using

PHP код:
new Float:A//this is so we can store the angle we need
GetPlayerFacingAngle(i,A); //A now has the angle of the player
SetActorFacingAngle(i,A+180);//A has the player facing angle, we wanna add 180 degrees to that 
By adding a +90 to the Angle, it's adding 90 degress to that number that is stored in the A
Reply
#9

ihatetn931, you test? It not work too!
Reply
#10

May i ask why you're adding to the angle?

When you can just face the way you want the actor to be then do this

PHP код:
new Float:A
GetPlayerFacingAngle(playerid,A); 
for(new 
0counti++) 

    
SetActorFacingAngle(i,A); 

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)