Frictional Games Forum (read-only)

Full Version: [HELP] Scripting Cranks
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What are the scripts for cranks? Like, I want the player to turn it, and then stuff happens?
Help, please!
SetEntityConnectionStateChangeCallback(string& wheelName, string& callback);

The parameters for the callback function are (string &in entity, int state). You'll have to fiddle with it to see which direction you turn the wheel/crank corresponds to which state. I believe -1 is min, 0 is middle and 1 is max.