The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make a piano lid lift slowly
Cryaotic Offline
Senior Member

Posts: 369
Threads: 13
Joined: Oct 2010
Reputation: 72
#1
How to make a piano lid lift slowly

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:
PHP Code: (Select All)
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"0GetLocalVarFloat("LiftBuildUp"), 0"world");    AddTimer ("LiftingPiano"0.1"LiftingPiano1");    AddLocalVarFloat("LiftBuildUp"15);}}
void PianoLiftStopFunc(string &in asTimer){    if(asTimer=="PianoLiftStop"){    RemoveTimer("LiftingPiano");    RemoveTimer("LiftingPiano1");    }} 
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)

12-18-2011, 12:05 AM
Find


Messages In This Thread
How to make a piano lid lift slowly - by Cryaotic - 12-18-2011, 12:05 AM



Users browsing this thread: 1 Guest(s)