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

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Making chests fly open with touched.
Homicide13 Offline
Senior Member

Posts: 323
Threads: 41
Joined: Nov 2010
Reputation: 14
Making chests fly open with touched.

So I know the callback function
would be used, and the function that it would call to would look something like
void Chest1(string &in entity)
but the problem with this is that when a player opens the chest, he is grabbing onto it and so no matter how large the impulse the lid will be held in place by the player (well it will fly open and then fly back to a semi-closed state, or wherever the player's cursor is). Is there any way to get around this? (such as a way to make the player let go of the chest before it is sent flying open?)

11-10-2010, 01:39 AM
Find Reply
jens Offline
Frictional Games

Posts: 4,095
Threads: 199
Joined: Apr 2006
Reputation: 202
RE: Making chests fly open with touched.

I think you can use SetEntityInteractionDisabled("chest_small_6", true); to disable the interaction on the chest just before you give it the impulse, then shortly after you can turn on the interaction again.
11-10-2010, 06:55 AM
Website Find Reply

Users browsing this thread: 1 Guest(s)