VC:MP 0.4 (Beta) > Script Discussion

Rotating Sprites

(1/3) > >>

Honey.:
Hello,

I needed help in rotating sprites.I am trying to use SetRotationForPlayer( player, rotation ) but i get no errors and nothing happens.

I try to rotate it like this :


--- Code: ---s <-CreateSprite( "spritename.png", 500, 600, 0, 0, 0,255 );
s.ShowForPlayer( FindPlayer( player ) );
s.SetRotationForPlayer(player, 150);

--- End code ---

Flockshot:
Hmm i also have this error but it shows error in console
Saying that cannot find member variable

tђยภ๔єгรt๏г๓:

--- Code: ---s.RotateForPlayer(player, 150);
--- End code ---

Honey.:
That function does rotate the sprite but doesn't rotate the sprite I want but instead makes a new sprite and rotates that!

Multiple Sprites was a bug of my script which i fixed later but now there is a new problem.The needle's position keeps changing on the screen while moving.If my car stays still it doesn't move but If my car is not still it dances on the screen.

sseebbyy:
Maybe because you rotate the sprite when position is changed ?! (or in a speedometer script?)

Navigation

[0] Message Index

[#] Next page

Go to full version