Frictional Games Forum (read-only)
[SCRIPT] Crank / Pulley Problem.. - 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] Crank / Pulley Problem.. (/thread-51320.html)



Crank / Pulley Problem.. - Pshyched - 07-17-2016

Hey guys, been awhile since I've posted here but I have a bit of an Issue...

I'm attempting to try and do something where the player attaches a bucket onto the rope, and the crank then turns (On its own) and lifts the bucket up, after X amount of seconds, it'll come back down again (On its own, again)...

But I am not exactly sure how to go about this, if anyone has any advice It'd be gladly appreciated Smile


RE: Crank / Pulley Problem.. - FlawlessHappiness - 07-20-2016

Hello!

I searched a little bit and found this video: https://www.youtube.com/watch?v=Ksn4lHxbgPg
For connecting the bucket to the rope it seems you want to use:

PHP Code:
void AddAttachedPropToProp(stringasPropNamestringasAttachNamestringasAttachFilefloat afPosXfloat afPosYfloat afPosZfloat afRotXfloat afRotYfloat afRotZ); 

For rotating the crank, I would use:

PHP Code:
void SetWheelAngle(stringasNamefloat afAnglebool abAutoMove); 

Yet I'm not sure whether this can make the wheel turn by itself in an animated way. If it doesn't, maybe you can use a timer that calls very often and turns the wheel just a tiny bit at a time, until it's finished.

The x amount of seconds thing is just a timer.