Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with sounds!
Cgturner Offline
Junior Member

Posts: 28
Threads: 7
Joined: Sep 2010
Reputation: 0
#12
RE: Help with sounds!

(09-17-2010, 02:11 AM)Armored Cow Wrote: MulleDK19 seems to know his way around the editor/scripting Tongue

He's probably helped the most besides the developers.

Yeah! Hahaha. I have another question, anyone feel free to answer. In this scenario, I want the door to creak open by itself once you step into the script area. I can make the sound (but need the .snt for the best wooden creak noise), but I don't know how to put in the actual action of opening. Any help is welcome!

P.S. I see the - void SetMoveObjectState(string& asName, float afState); - function, and it seems to be what I need, but I'm not sure how to implement that into the script.

Coding so far:

void OnStart()

{
    PlaySoundAtEntity("bang", "10_close_door", "Player", 0, false);
    
    AddEntityCollideCallback("Player", "area_squeal", "Collidearea_squeal", true, 1);
    
    AddEntityCollideCallback("Player", "area_scratch", "Collidearea_scratch", true, 1);
    
    AddEntityCollideCallback("Player", "opendoor", "Collideopendoor", true, 1);
    
    SetEntityPlayerInteractCallback("lantern_1", "LanternTaken", true);
    
    AddUseItemCallback("useexit", "PrisonKey", "PrisonDoor", "UseKey", true);
}    

void UseKey(string &in asItem, string &in asEntity)
{
    SetSwingDoorLocked(asEntity, false, true);

    RemoveItem(asItem);
}

void Collidearea_squeal(string &in asParent, string &in asChild, int alState)
{
    PlaySoundAtEntity("animal_squeal", "custom_animal_squeal01.snt", "Player", 0, false);
}

void Collidearea_scratch(string &in asParent, string &in asChild, int alState)
{
    AddTimer("hit_wood.snt", 0.5f, "TimerSoundSequence");
    AddTimer("hit_wood.snt", 1.0f, "TimerSoundSequence");
    AddTimer("hit_wood.snt", 1.4f, "TimerSoundSequence");
}
void LanternTaken(string &in asEntity)
{
    PlaySoundAtEntity("scratch", "05_wall_scratch", "Player", 0, false);
}

void TimerSoundSequence(string &in asTimer)
{
    PlaySoundAtEntity("hitwood", asTimer, "castle_arched01_1", 0, false);
}

void Collideopendoor(string &in asParent, string &in asChild, int alState)
{
    PlaySoundAtEntity("open", "door_level_wood_open.snt", "castle_arched01_1", 1, true);
}
Thanks!
09-17-2010, 03:21 AM
Find


Messages In This Thread
Help with sounds! - by Cgturner - 09-16-2010, 07:42 PM
RE: Help with sounds! - by MulleDK19 - 09-16-2010, 07:54 PM
RE: Help with sounds! - by Armored Cow - 09-16-2010, 08:01 PM
RE: Help with sounds! - by Cgturner - 09-16-2010, 08:18 PM
RE: Help with sounds! - by MulleDK19 - 09-16-2010, 08:19 PM
RE: Help with sounds! - by Cgturner - 09-17-2010, 01:00 AM
RE: Help with sounds! - by MulleDK19 - 09-17-2010, 01:07 AM
RE: Help with sounds! - by Cgturner - 09-17-2010, 01:18 AM
RE: Help with sounds! - by MulleDK19 - 09-17-2010, 01:31 AM
RE: Help with sounds! - by Cgturner - 09-17-2010, 01:45 AM
RE: Help with sounds! - by Armored Cow - 09-17-2010, 02:11 AM
RE: Help with sounds! - by Cgturner - 09-17-2010, 03:21 AM
RE: Help with sounds! - by MulleDK19 - 09-17-2010, 03:25 AM
RE: Help with sounds! - by Cgturner - 09-17-2010, 03:51 AM
RE: Help with sounds! - by MulleDK19 - 09-17-2010, 04:06 PM
RE: Help with sounds! - by Cgturner - 09-17-2010, 03:56 PM
RE: Help with sounds! - by jens - 09-17-2010, 04:17 PM
RE: Help with sounds! - by Armored Cow - 09-17-2010, 04:04 PM
RE: Help with sounds! - by Cgturner - 09-17-2010, 04:25 PM
RE: Help with sounds! - by Cgturner - 09-18-2010, 06:58 AM
RE: Help with sounds! - by gosseyn - 09-18-2010, 07:19 AM
RE: Help with sounds! - by Cgturner - 09-18-2010, 07:51 AM



Users browsing this thread: 3 Guest(s)