![]() |
[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 ![]() 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(string& asPropName, string& asAttachName, string& asAttachFile, float afPosX, float afPosY, float afPosZ, float afRotX, float afRotY, float afRotZ); For rotating the crank, I would use: PHP Code: void SetWheelAngle(string& asName, float afAngle, bool 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. |