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
Problem with lurker Music [SOLVED]
Selyp Offline
Member

Posts: 210
Threads: 19
Joined: Feb 2011
Reputation: 7
#4
RE: Problem with lurker Music

(02-24-2011, 08:56 PM)junkfood2121 Wrote: I'm still relatively new to scripting, how do you make an area where the music only plays if ur in it?

Make a Script Area in the level editor, then in your .hps file you would add an EntityCollideCallback making it play the music when the player is in the area. Something like

OnEnter()
{
AddEntityCollideCallback("Player", "name_of_script_area", "name_of_function_", true, 1);
}

Then your function would be

void Name_of_Function (string &in asParent, string &in asChild, int alState)
{
PlayMusic("Name_of_music_file", true, 1, 1, 1, true);
}

That probably won't work exactly as intended, but it should give you a solid basis to work off of.

Atlantia - An Amnesia: The Dark Descent Full Conversion Mod
02-25-2011, 12:24 AM
Find


Messages In This Thread
RE: Problem with lurker Music - by Selyp - 02-24-2011, 07:31 PM
RE: Problem with lurker Music - by Linus Ågren - 02-24-2011, 08:56 PM
RE: Problem with lurker Music - by Selyp - 02-25-2011, 12:24 AM
RE: Problem with lurker Music - by Linus Ågren - 02-25-2011, 01:32 AM
RE: Problem with lurker Music - by Nye - 02-25-2011, 01:40 AM
RE: Problem with lurker Music - by Linus Ågren - 02-25-2011, 01:56 AM



Users browsing this thread: 1 Guest(s)