Forum

> > CS2D > Scripts > rotation
Forums overviewCS2D overview Scripts overviewLog in to reply

English rotation

6 replies
To the start Previous 1 Next To the start

old rotation

scriptmen
User Off Offline

Quote
hello. in my mod I have to remove all default skins from cs2d ( make them fully transparent) because I added another skin system but I faced a problem. when i attack with knife or machete the melee weapon image rotates a little bit and in normal cs2d it looks good because both skin and knife rotate, but in my mod only knife image rotates while the player skin is not changing because it is just an image. can anyone help me to make this player skin "animation"? (to make both image that is player skin and the melee weapon image rotate as usual)

hope you'll help, thanks:)

old Re: rotation

Gaios
Reviewer Off Offline

Quote
Very good topic. DC help!
      > How do it?

Admin/mod comment

Why are you all calling for DC? There's 78 thousand other users that can help. This is also a completely useless post. /Engi

old Re: rotation

EngiN33R
Moderator Off Offline

Quote
I can't write you the whole code, but you can use cs2d lua cmd tween_rotate and rotate the image slightly corresponding to the knife rotation. Depending on the image you may have to move it though, so cs2d lua cmd tween_move or cs2d lua cmd imagepos may have to be used.

old Re: rotation

DC
Admin Off Offline

Quote
Note that it's not possible to solve this in a perfect way because:
• The knife slashing animation is executed locally and instantly
• The Lua script required for the animation is executed on the server. It will be delayed by your current ping value in milliseconds.

So it will always look stupid at least for those people with a "high" ping.

And before someone asks me to add locally executed client-side Lua scripts: Won't happen.

old Re: rotation

Infinite Rain
Reviewer Off Offline

Quote
user DC has written
Note that it's not possible to solve this in a perfect way because:
• The knife slashing animation is executed locally and instantly
• The Lua script required for the animation is executed on the server. It will be delayed by your current ping value in milliseconds.

So it will always look stupid at least for those people with a "high" ping.

And before someone asks me to add locally executed client-side Lua scripts: Won't happen.
Why won't you do that?

old Re: rotation

DC
Admin Off Offline

Quote
It would drive the complexity into insane new levels. Tons of new commands (for everything but client-sided) would be required. And of course it's a mega huge security risk allowing super easy mega cheat development. It's absolutely not an option. It would destroy CS2D even more.

old Re: rotation

Infinite Rain
Reviewer Off Offline

Quote
user DC has written
It would drive the complexity into insane new levels. Tons of new commands (for everything but client-sided) would be required. And of course it's a mega huge security risk allowing super easy mega cheat development. It's absolutely not an option. It would destroy CS2D even more.
Damn it. But did you read my idea about binding? In Ideas thread.

Admin/mod comment

Rules §4.5 - Stick to the point! No off-topic posts! - yes I read it and I don't feel like commenting it
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview