Forum

> > CS2D > Scripts > Rotating image on player
Forums overviewCS2D overview Scripts overviewLog in to reply

English Rotating image on player

2 replies
To the start Previous 1 Next To the start

old Rotating image on player

Alistaire
User Off Offline

Quote
How to make an image rotate in Lua while it's on the player?

1
2
3
4
5
6
function MM.magic()
	magic[id]=image("Path/Image.png",0,0,200+id)
	imageblend(magic[id],1)
	magic_rotateconstantly(magic[id],5)
end
MM.magic()

Or am I missing something?

old Re: Rotating image on player

DC
Admin Off Offline

Quote
well.. magic_rotateconstantly is no standard function of CS2D so I can't say what's wrong there without seeing its code.

note that the x coordinate matters for rotation if you are using a "draw at player"-mode for an image.
x<=0: do not rotate with player - you can set the rotation yourself (your x is 0 so you should be able to rotate the image!)
x>0: the image is automatically rotated with the player. you can't change the rotation at all!
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview