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
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#1
Spin

Hai how to make some object spin..
Like in ATDD last level if you look up you will see rocks spinning

So i need something like that (so how to make entities spins) ?

+Rep for one who solve Tongue

11-01-2014, 08:08 AM
Find
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
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#3
RE: Spin

That MUSTACHE!!! Tongue You Sexy thing! Wink

Btw Strax*!!
This is what Rom ment;
PHP Code: (Select All)
RotatePropToSpeed("The_Prop_You_want_to_spin"44050false""); 
(This post was last modified: 11-01-2014, 12:08 PM by DnALANGE.)
11-01-2014, 12:06 PM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#4
RE: Spin

But that can't spins entities right ?

11-01-2014, 06:52 PM
Find
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#5
RE: Spin

(11-01-2014, 06:52 PM)Straxedix Wrote: But that can't spins entities right ?

Why not?

11-01-2014, 08:53 PM
Find
Straxedix Offline
Senior Member

Posts: 426
Threads: 52
Joined: Mar 2014
Reputation: 5
#6
RE: Spin

(11-01-2014, 08:53 PM)Datguy5 Wrote:
(11-01-2014, 06:52 PM)Straxedix Wrote: But that can't spins entities right ?

Why not?

So it can ?
Thanks :3

11-01-2014, 08:56 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#7
RE: Spin

Off ourse it will strax.
Try messing around with the numbers. If they dont really hace the good speed.
11-02-2014, 01:08 AM
Find




Users browsing this thread: 3 Guest(s)