Frictional Games Forum (read-only)
[SCRIPT] Spin - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [SCRIPT] Spin (/thread-27072.html)



Spin - Straxedix - 11-01-2014

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


RE: Spin - Romulator - 11-01-2014

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

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


Code:
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.


RE: Spin - DnALANGE - 11-01-2014

That MUSTACHE!!! Tongue You Sexy thing! Wink

Btw Strax*!!
This is what Rom ment;
PHP Code:
RotatePropToSpeed("The_Prop_You_want_to_spin"44050false""); 



RE: Spin - Straxedix - 11-01-2014

But that can't spins entities right ?


RE: Spin - Datguy5 - 11-01-2014

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

Why not?


RE: Spin - Straxedix - 11-01-2014

(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


RE: Spin - DnALANGE - 11-02-2014

Off ourse it will strax.
Try messing around with the numbers. If they dont really hace the good speed.