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
[HELP] Keg Pop
Adny Offline
Posting Freak

Posts: 1,766
Threads: 6
Joined: Mar 2012
Reputation: 173
#2
RE: [HELP] Keg Pop

Some entities can't be interacted with in such a way, luckily, there's a way to work around it. Simply create a script area (8 in the level editor>Script) and make it roughly the same size as the keg (try to make it as close as possible), and make sure it completely surround the keg entity. Next, select the script area, and press the "Area" tab. Make sure "Item Interaction" is checked. Name this script area whatever you'd like.

For the scripting portion, instead of using the actual keg's name as the entity for the knife to be used on, replace it with the name of the script area.


void OnStart()
{
AddUseItemCallback("", "breakkegknife", "NAMEOFSCRIPTAREA", "boomkegopen", true);
}

void boomkegopen(string &in asItem, string &in asEntity)
{
PlaySoundAtEntity("bruto2", "put_knife.snt", "Player", 0.0f, false);
SetEntityActive("breakkeg_1", true);
}

Hope that helped.

I rate it 3 memes.
06-30-2012, 02:11 AM
Find


Messages In This Thread
[HELP] Keg Pop - by himynamebob1 - 06-30-2012, 01:51 AM
RE: [HELP] Keg Pop - by Adny - 06-30-2012, 02:11 AM
RE: [HELP] Keg Pop - by himynamebob1 - 06-30-2012, 02:57 AM
RE: [HELP] Keg Pop - by Cruzore - 06-30-2012, 11:08 AM
RE: [HELP] Keg Pop - by Adny - 06-30-2012, 01:11 PM
RE: [HELP] Keg Pop - by himynamebob1 - 06-30-2012, 05:05 PM
RE: [HELP] Keg Pop - by Cruzore - 06-30-2012, 05:09 PM
RE: [HELP] Keg Pop - by himynamebob1 - 06-30-2012, 05:33 PM
RE: [HELP] Keg Pop - by Cruzore - 06-30-2012, 05:35 PM
RE: [HELP] Keg Pop - by himynamebob1 - 06-30-2012, 05:37 PM
RE: [HELP] Keg Pop - by Cruzore - 06-30-2012, 05:59 PM
RE: [HELP] Keg Pop - by himynamebob1 - 06-30-2012, 07:35 PM
RE: [HELP] Keg Pop - by Cruzore - 06-30-2012, 07:42 PM
RE: [HELP] Keg Pop - by himynamebob1 - 06-30-2012, 08:02 PM
RE: [HELP] Keg Pop - by himynamebob1 - 07-01-2012, 12:23 AM
RE: [HELP] Keg Pop - by Cruzore - 07-01-2012, 12:31 AM
RE: [HELP] Keg Pop - by himynamebob1 - 07-01-2012, 12:38 AM
RE: [HELP] Keg Pop - by Cruzore - 07-01-2012, 12:44 AM
RE: [HELP] Keg Pop - by himynamebob1 - 07-01-2012, 01:27 AM
RE: [HELP] Keg Pop - by Cruzore - 07-01-2012, 02:08 AM
RE: [HELP] Keg Pop - by himynamebob1 - 07-01-2012, 02:39 AM
RE: [HELP] Keg Pop - by Adny - 07-01-2012, 03:18 AM



Users browsing this thread: 1 Guest(s)