Say you have a 3D member in Sprite(1) with Automatic Model Rotation behaviour (from the Library) attached. You can access and modify the speed of the rotation using:
--
sprite(1).scriptInstanceList[1].pSpeed
--
The following button script will increase the rotation speed of sprite(1) by 1 on every mouse click. The max speed is set to 10.
--
on mouseUp me
tSpeed = sprite(1).scriptInstanceList[1].pSpeed
if tSpeed < 10 then
tSpeed = tSpeed + 1
sprite(1).scriptInstanceList[1].pSpeed = tSpeed
end if
end mouseUp
--
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.