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
Key in jar
Vic7im Offline
Junior Member

Posts: 44
Threads: 9
Joined: Sep 2012
Reputation: 3
#5
RE: Key in jar

(09-27-2012, 11:11 AM)beecake Wrote:
(09-27-2012, 09:13 AM)Vic7im Wrote: A cheap trick that might work:

You create the jar, make it Static and without a contained item.
You create the key_custom and place it in the same spot the contained key is, make it inactive.
Create a callback when interacting with the Jar so that it breaks (prophealth = -1) and sets your key_custom active.

This should work, imho.
But it wouldn't make sense that the bottle just broke...
Try this:

Spoiler below!


void OnStart()
{
SetEntityPlayerInteractCallback("Jar", "CreateKey", true);

}




void CreateKey (string &in asEntity)
{
SetPropHealth("Jar", -1);
AddPropImpulse("Jar", 0, 0, 1, "world");
SetEntityActive("Key", true);
}


Result here: http://www31.zippyshare.com/v/62757806/file.html
09-27-2012, 02:19 PM
Find


Messages In This Thread
Key in jar - by Damascus - 09-26-2012, 08:56 AM
RE: Key in jar - by jamesclarke555 - 09-26-2012, 09:28 AM
RE: Key in jar - by Vic7im - 09-27-2012, 09:13 AM
RE: Key in jar - by FlawlessHappiness - 09-27-2012, 11:11 AM
RE: Key in jar - by Vic7im - 09-27-2012, 02:19 PM



Users browsing this thread: 2 Guest(s)