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 Help getting music to play in map
LDOriginal Offline
Junior Member

Posts: 35
Threads: 7
Joined: Oct 2014
Reputation: 0
#12
RE: Help getting music to play in map

void OnStart()
{
PlaySoundAtEntity("", "general_piano01.snt", "Player", 0.0f, false);
PlayMusic("02_amb_safe.ogg", true, 1.0f, 0, 0, true);
AddEntityCollideCallback("Player", "Flaska", "PlaySound", true, 1);
AddEntityCollideCallback("Player", "Ljud", "start", true, 1);
AddUseItemCallback("", "Key", "Door", "UseKeyOnDoor", true);
AddUseItemCallback("", "Nyckel", "Rumpa", "UseKeyOnDoor", true);
AddUseItemCallback("", "Tillskåp", "Skåp", "UseKeyOnDoor", true);

}

void UseKeyOnDoor(string &in asItem, string &in asEntity)
{
SetSwingDoorLocked(asEntity, false, true);
PlaySoundAtEntity("", "Unlock_door.snt", asEntity, 10, false);
RemoveItem(asItem);
}

void start(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "general_piano01.snt", "Player", 1, false);
}

void PlaySound(string &in asParent, string &in asChild, int alState)
{
PlaySoundAtEntity("", "21_intro_scream.snt", "Player", 1, false);
}

I was able to load the map but now when i enter an area general_piano01.snt, 02_amb_safe.ogg, 21_intro_scream.snt plays at the same time, lol. How does one separate these to play in their respective areas? I know you're suppose to name the area but i don't really see the solution in the script.
(This post was last modified: 02-01-2015, 06:30 PM by LDOriginal.)
02-01-2015, 06:13 PM
Find


Messages In This Thread
Help getting music to play in map - by LDOriginal - 02-01-2015, 01:49 PM
RE: Help getting music to play in map - by Neelke - 02-01-2015, 01:57 PM
RE: Help getting music to play in map - by Neelke - 02-01-2015, 02:05 PM
RE: Help getting music to play in map - by Neelke - 02-01-2015, 02:18 PM
RE: Help getting music to play in map - by Neelke - 02-01-2015, 02:49 PM
RE: Help getting music to play in map - by LDOriginal - 02-01-2015, 06:13 PM
RE: Help getting music to play in map - by Neelke - 02-01-2015, 09:02 PM
RE: Help getting music to play in map - by Neelke - 02-01-2015, 10:39 PM



Users browsing this thread: 7 Guest(s)