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
Trying to stab a pig!
oscar1007 Offline
Member

Posts: 64
Threads: 24
Joined: Oct 2011
Reputation: 0
#1
Trying to stab a pig!

... but i cant get it to work! Sad
The deal is that you are suppose to get a key in you inventory when you have stabbed it.
When i try to use the dagger at the pig it says something like: "cannot use item this way".

Here is my script for it:


void OnStart()
{
AddEntityCollideCallback("ceremony_knife_1", "pig_corpse_1", "pig_stab", "true", 1);
}


void pig_stab(string &in asParent, string &in asChild, int alState)
{
GiveItem("Player", "key_torture_chamber_1", "key_torture_chamber_1", "key_torture_chamber_1.tga", 1);
GiveSanityBoostSmall();
}

Can someone help me?!

Thanks!

Money can't buy you happiness. But I rather cry in my ferrari.

PROJECT:
http://www.moddb.com/mods/oscar1007
(This post was last modified: 01-18-2012, 10:21 AM by oscar1007.)
01-15-2012, 07:22 PM
Find
Khyrpa Offline
Senior Member

Posts: 638
Threads: 10
Joined: Apr 2011
Reputation: 24
#2
RE: Trying to stab a pig!

Grab a dagger ("ceremony_knife_1")
Take out the dagger and prepare it (use it through your inventory)
Take a touch at the pig with the dagger (use it to the pig)
The dagger hits the pigs flesh physically (AddUseItemCallback)
Blood spills around and it makes noises (CreateParticleSystemAtEntity, PlaySoundAtEntity)
etc.

search the stuff from engine script page

doubt that makes any sense... This should:

void OnStart()
{
AddUseItemCallback("", "ceremony_knife_1", "pig_corpse_1", "pig_stab", true);
}

(This post was last modified: 01-15-2012, 07:33 PM by Khyrpa.)
01-15-2012, 07:31 PM
Find
oscar1007 Offline
Member

Posts: 64
Threads: 24
Joined: Oct 2011
Reputation: 0
#3
RE: Trying to stab a pig!

I have changed so i now have this:

void OnStart()
{
AddUseItemCallback("", "ceremony_knife_1", "pig_corpse_1", "pig_stab", true);

}


void pig_stab(string &in asParent, string &in asChild, int alState)
{
GiveItem("Player", "key_torture_chamber_1", "key_torture_chamber_1", "key_torture_chamber_1.tga", 1);
GiveSanityBoostSmall();
}

What do i need to change?
Anyone ? Please!

Money can't buy you happiness. But I rather cry in my ferrari.

PROJECT:
http://www.moddb.com/mods/oscar1007
(This post was last modified: 01-15-2012, 08:35 PM by oscar1007.)
01-15-2012, 07:42 PM
Find
flamez3 Offline
Posting Freak

Posts: 1,281
Threads: 48
Joined: Apr 2011
Reputation: 57
#4
RE: Trying to stab a pig!

You are using the wrong syntax for AddUseItemCallback

Replace

(string &in asParent, string &in asChild, int alState)


With

(string &in asItem, string &in asEntity)

01-16-2012, 03:03 AM
Find
oscar1007 Offline
Member

Posts: 64
Threads: 24
Joined: Oct 2011
Reputation: 0
#5
RE: Trying to stab a pig!

(01-16-2012, 03:03 AM)flamez3 Wrote: You are using the wrong syntax for AddUseItemCallback

Replace

(string &in asParent, string &in asChild, int alState)


With

(string &in asItem, string &in asEntity)
Thank you! The combining of the two items work now! Now i will only need to get the Give item line right!
Yes i got it to work!!! Smile Thanks to all of you!

Money can't buy you happiness. But I rather cry in my ferrari.

PROJECT:
http://www.moddb.com/mods/oscar1007
(This post was last modified: 01-16-2012, 05:00 PM by oscar1007.)
01-16-2012, 04:47 PM
Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#6
RE: Trying to stab a pig!

I smell another PewDiePie map...*sigh*..

Current - Castle Darkuan
Other - F*cked Map
01-17-2012, 09:37 AM
Find
oscar1007 Offline
Member

Posts: 64
Threads: 24
Joined: Oct 2011
Reputation: 0
#7
RE: Trying to stab a pig!

(01-17-2012, 09:37 AM)Shadowfied Wrote: I smell another PewDiePie map...*sigh*..
No.. actually i have only seen stabbing a pig like one or two other times in custom stories. And i watch every video pewdiepie plays. I think stabbing human bodies have been used more.

TBH i also think there are too many pewdiepie maps out there. And just to prove that this isn't a pewdiepie map... There isn't a "Stephano" in every room.

Money can't buy you happiness. But I rather cry in my ferrari.

PROJECT:
http://www.moddb.com/mods/oscar1007
01-17-2012, 01:28 PM
Find
Shadowfied Offline
Senior Member

Posts: 261
Threads: 34
Joined: Jul 2010
Reputation: 5
#8
RE: Trying to stab a pig!

(01-17-2012, 01:28 PM)oscar1007 Wrote:
(01-17-2012, 09:37 AM)Shadowfied Wrote: I smell another PewDiePie map...*sigh*..
No.. actually i have only seen stabbing a pig like one or two other times in custom stories. And i watch every video pewdiepie plays. I think stabbing human bodies have been used more.

TBH i also think there are too many pewdiepie maps out there. And just to prove that this isn't a pewdiepie map... There isn't a "Stephano" in every room.
If it's not a PewDiePie map you leave those godforsaken statues out of the entire custom story.


Current - Castle Darkuan
Other - F*cked Map
01-17-2012, 01:40 PM
Find




Users browsing this thread: 1 Guest(s)