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
sound problems
Frontcannon Offline
Senior Member

Posts: 538
Threads: 10
Joined: Jul 2010
Reputation: 2
#2
RE: sound problems

Callbacks ALWAYS go in OnStart (well, not always, but for your skill level) or they'll never be executed at all.

The PlaySoundAtEntity Func is... ugh.

////////////////////////////
// Run first time starting map
void OnStart()
{
AddEntityCollideCallback("Player", "doorslam_1", "Collidedoorslam", true, -1);

AddEntityCollideCallback("Player", "Room_2", "PlaySoundAtEntity", true, -1);

if(ScriptDebugOn())
{
GiveItemFromFile("lantern", "lantern.ent");

for(int i=0;i<10;i++) GiveItemFromFile("tinderbox_"+i, "tinderbox.ent");
}
}

void Collidedoorslam(string &in asParent, string &in asChild, int alState)
{
SetSwingDoorClosed("Room_2", true, true);
}

void PlaySoundAtEntity(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("Player", "amb_hunt01", "Door_2", 0, false);
}

////////////////////////////
// Run when entering map
void OnEnter()
{
}

////////////////////////////
// Run when leaving map
void OnLeave()
{
}


╔═════════════════╗
☺ Smoke weed everyday ☺
╚═════════════════╝
12-01-2010, 07:56 PM
Find


Messages In This Thread
sound problems - by THE/ILL/WILL - 12-01-2010, 07:44 PM
RE: sound problems - by Frontcannon - 12-01-2010, 07:56 PM
RE: sound problems - by THE/ILL/WILL - 12-01-2010, 08:22 PM
RE: sound problems - by LoneWolf - 12-01-2010, 08:27 PM
RE: sound problems - by THE/ILL/WILL - 12-01-2010, 08:34 PM
RE: sound problems - by Frontcannon - 12-01-2010, 08:47 PM
RE: sound problems - by THE/ILL/WILL - 12-01-2010, 08:58 PM
RE: sound problems - by Frontcannon - 12-01-2010, 09:13 PM
RE: sound problems - by THE/ILL/WILL - 12-01-2010, 10:01 PM
RE: sound problems - by Frontcannon - 12-01-2010, 10:07 PM
RE: sound problems - by THE/ILL/WILL - 12-02-2010, 03:02 AM
RE: sound problems - by Oscar House - 12-02-2010, 03:49 PM
RE: sound problems - by Akumasama - 12-02-2010, 04:04 PM



Users browsing this thread: 1 Guest(s)