12-18-2011, 12:05 AM
As of right now I have the lid opening upon interaction with an object, it opens all the way after a jerky movement which is all fine and good, though I was going for a slowly moving effect which seems quite challenging to come by.
This is what I have currently:Does anyone by chance have any idea of what I could do to make the effect more fluid and simply open as if the player's hand was slowly opening it instead of a jerky madness that is this?
Thank you kindly for any assistance!
(also I have no idea how to make the format of the code look good on the forum, it's being weird for me)
This is what I have currently:
PHP Code:
void pianocoverlift1(string &in asEntity){ if(GetLocalVarInt("LiftDone") != 1){ SetLocalVarFloat("LiftBuildUp", 0); AddTimer ("LiftingPiano", 0.50, "LiftingPiano1"); AddTimer ("PianoLiftStop", 4.5, "PianoLiftStopFunc");} else{ RemoveTimer("LiftingPiano"); }}
void LiftingPiano1(string &in asTimer){ if(GetLocalVarInt("LiftDone") != 1){ AddPropForce("pianocloset", 0, GetLocalVarFloat("LiftBuildUp"), 0, "world"); AddTimer ("LiftingPiano", 0.1, "LiftingPiano1"); AddLocalVarFloat("LiftBuildUp", 15);}}
void PianoLiftStopFunc(string &in asTimer){ if(asTimer=="PianoLiftStop"){ RemoveTimer("LiftingPiano"); RemoveTimer("LiftingPiano1"); }}
Thank you kindly for any assistance!
(also I have no idea how to make the format of the code look good on the forum, it's being weird for me)