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


Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Piano?
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: Piano?

I believe you need a combination of "SetLeverStuckState" and "AddPropImpulse".

I've taken the liberty to find the script FG used in the Archives map, which seems to be what you're looking for (I've removed all scripts irrelevant to the desired function):



void CollideCloseLid(string &in asParent, string &in asChild, int alState)
{
SetLeverStuckState("piano_1", 0, false);
AddPropImpulse("piano_1", 0,0,10, "world");

GiveSanityDamage(10, true);
}



Since your event takes place when the player interacts directly with the piano rather than colliding with an area, you can use the following callback syntax:

void pianofunction(string &in asEntity)

I hope that helped!

I rate it 3 memes.
06-05-2012, 10:07 AM
Find


Messages In This Thread
Piano? - by EmmetVG - 06-05-2012, 09:44 AM
RE: Piano? - by Adny - 06-05-2012, 10:07 AM
RE: Piano? - by EmmetVG - 06-06-2012, 05:53 PM



Users browsing this thread: 1 Guest(s)