Difference between revisions of "Questions"

Jump to navigation Jump to search
977 bytes removed ,  12:21, 30 May 2006
m
no edit summary
imported>DragoonWraith
imported>Omegacron
m
Line 388: Line 388:
== Can a script be used to rotate an object clockwise on the Z axis to create a constant spinning effect? ==
== Can a script be used to rotate an object clockwise on the Z axis to create a constant spinning effect? ==


I have a cluster of crystals floating in mid-air and I want to make them rotate. I know this should be possible using a script, but I can't figure out the correct commands to use. Any help would be greatly appreciated.
(This question has been moved to the Solutions page).
 
--[[User:Omegacron|Omegacron]] 11:06, 30 May 2006


--[[User:Omegacron|Omegacron]] 11:42, 23 May 2006


:Put the following script on them:
scn spinningCrystals
short doOnce
float spinSpeed
Begin GameMode
  if ( doOnce == 0 )
    set spinSpeed to ( 90 + ( ( GetRandomPercent * 450 ) / 99 ) )
    set doOnce to 1
  endif
  Rotate Z spinSpeed
End
:That will rotate the crystal at a constant speed. For fun, I made it so each crystal will choose between 90 and 540 degrees/sec (between 4sec per turn and 2turns per sec), so the crystals won't all spin at the same speed, some will spin very quickly, some rather slowly. If you want them all to spin the same speed, you can just use this:
scn spinningCrystals
Begin GameMode
Rotate Z #
End
:The number is how many degrees per second the object rotates. But that's much less fun. --[[User:DragoonWraith|DragoonWraith]] 11:35, 28 May 2006 (EDT)


==Problem Modifying Plugins with another Plugin==
==Problem Modifying Plugins with another Plugin==
Anonymous user

Navigation menu