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
Script help!
Clear Offline
Junior Member

Posts: 19
Threads: 4
Joined: May 2012
Reputation: 0
#3
RE: Script help!

(06-10-2012, 10:23 AM)SilentStriker Wrote: Well rename all the pigs with the same name for example pig_1, pig_2 etc then use this script

The bolded 10 is how many pigs you have so if you have 5 change it to 5 if you have 15 then change the 10 to 15 etc Smile
PHP Code: (Select All)
void OnStart()
{
for(
int i=0;i<10;i++) SetEntityPlayerInteractCallback("Pig_"+i"PigSound"false);
}

void PigSound(string &in asEntity)
{
PlaySoundAtEntity("""NAMEOFSOUND"asEntity0false);
//Put other things here if you want


This is the code pretty much Smile



Thank you so much for the help! =D
I'm new at all the scripting parts, so just a few more questions,
Where do i put this code?
How come there is "PigSound" and "NAMEOFSOUND" Do i put the same sound ".ogg" in there?
That's it! Big Grin
Thanks again! Smile
06-10-2012, 10:26 AM
Find


Messages In This Thread
Script help! - by Clear - 06-10-2012, 10:09 AM
RE: Script help! - by SilentStriker - 06-10-2012, 10:23 AM
RE: Script help! - by Clear - 06-10-2012, 10:26 AM
RE: Script help! - by SilentStriker - 06-10-2012, 10:45 AM
RE: Script help! - by Clear - 06-10-2012, 04:01 PM
RE: Script help! - by SilentStriker - 06-10-2012, 04:13 PM
RE: Script help! - by FlawlessHappiness - 06-10-2012, 04:22 PM
RE: Script help! - by SilentStriker - 06-10-2012, 04:25 PM
RE: Script help! - by Clear - 06-12-2012, 04:02 PM
RE: Script help! - by CorinthianMerchant - 06-12-2012, 04:11 PM
RE: Script help! - by Clear - 06-12-2012, 05:00 PM
RE: Script help! - by CorinthianMerchant - 06-12-2012, 07:35 PM
RE: Script help! - by Adny - 06-12-2012, 05:07 PM



Users browsing this thread: 5 Guest(s)