Forum

> > CS2D > Scripts > Image rot check
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Image rot check

8 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Image rot check

Mora
User Off Offline

Zitieren
Hello us
oh i was not active for a long time..ll bcs i has no net.. and i've start to do anything in cs2d with lua..
I want to know how to check image rotate.
Example i have image kudygjfggf
this image its gonna rotate as fast as i will set the rotation speed for it when player rotate its more / smaller than pl. rot.
1
2
3
4
5
6
kudygjfggf = {
speed = "5"
}
kudygjfggf [id] =image...
If kudygjfggf[id].rotate<player rot then
Rotate kudygjfggf[id].speed
Thank you and sorry for my terrible text.. small phone is very small.. hard to writte..
Thank u

alt Re: Image rot check

Rainoth
Moderator Off Offline

Zitieren
Well, whenever you rotate the image, you got to have some kind of variable to rotate it with, if not, you can just store the rotation in one and set it. Tadaah.. There's your image rotation...

alt Re: Image rot check

Mora
User Off Offline

Zitieren
@Rainoth, i mean.. oh so hard.. this phone dont let me..
I forget to writte:
1
2
3
4
5
6
If imagerot>plaelyerrot then
Tween rotate(with speed i ve SET)
Elseif imagerot<playerrot then
Tween rotate(with - speed i ve set)
Elseif imagerot==playerrot then
Image is no rotate
maybe I ve not right understand u, but my engizzz is bat.. and there is source of urs info?

alt Re: Image rot check

Mora
User Off Offline

Zitieren
@Infinite Rain, so, i can replace object(id,'rot') to object(img[id],'rot')?
Thank u bebis,i ll try it later..

alt Re: Image rot check

Mora
User Off Offline

Zitieren
/@Inf Rain: thank you, its work, but idk there is no 360 but 180 and - 180 rad. When my rot is ~180 and ~-180 its move to another way
not so matterness text >
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht