Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Spin
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#2
RE: Spin

Strax, is there a reason you cannot look over the Engine Scripts on the wiki?

Spoiler below!
PHP Code: (Select All)
RotatePropToSpeed(stringasNamefloat afAccfloat afGoalSpeedfloat afAxisXfloat afAxisYfloat afAxisZbool abResetSpeedstringasOffsetArea); 


asName - internal name
afAcc - acceleration
afGoalSpeed - desired speed
afAxisX - rotation around X axis
afAxisY - rotation around Y axis
afAxisZ - rotation around Z axis
abResetSpeed - determines whether the speed is resetted after goal speed is reached
asOffsetArea - the area to rotate around, if “”, then the center of the body is used

This should be what you're after. How you execute it is by using it within the code block where you wish for it to happen - whether it be when a collide callback occurs or after a timer for example.

You may need to make the object a static object however. Some objects work fine with it, others don't.

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 11-01-2014, 08:51 AM by Romulator.)
11-01-2014, 08:36 AM
Find


Messages In This Thread
Spin - by Straxedix - 11-01-2014, 08:08 AM
RE: Spin - by Romulator - 11-01-2014, 08:36 AM
RE: Spin - by DnALANGE - 11-01-2014, 12:06 PM
RE: Spin - by Straxedix - 11-01-2014, 06:52 PM
RE: Spin - by Datguy5 - 11-01-2014, 08:53 PM
RE: Spin - by Straxedix - 11-01-2014, 08:56 PM
RE: Spin - by DnALANGE - 11-02-2014, 01:08 AM



Users browsing this thread: 1 Guest(s)