I am aware of the rotate command and tried using it but whatever I do in scripting never turns out the way I intended it, while I know you guys make such script in five minutes and it works.
Thanks!
Should be as simple as (for 15 degrees per sec):
begin rot_scri
rotate z 15
rotate y 15
end
I simply made one of float scripts to just rotate. Although pivot should be changed properly in the mesh.
begin floatAboveVt
float timer
float swingTime
float startAngle
float startAngle2
float currangle
float currangle2
float xvalue
short reset
short initialized
if ( initialized == 0 )
set startAngle to GetAngle, X
set startAngle2 to GetAngle, Y
set swingTime to 1
set initialized to 1
endif
if ( MenuMode == 0 )
if ( timer == 0 )
if ( reset == 0 )
set timer to Random 100
set timer to timer / 4
endif
endif
set timer to ( timer + GetSecondsPassed )
set currangle to GetAngle X
set currangle2 to GetAngle Y
;These set the amount to move or rotate depending on framerate:
set xvalue to 10 * GetSecondsPassed
; the crate sways around its x axis:
set currangle to currangle + xvalue
set currangle2 to currangle2 + xvalue
SetAngle X currangle
SetAngle Y currangle2
endif
end