![]() |
Music OnStart? - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: Music OnStart? (/thread-18576.html) |
Music OnStart? - srobb - 10-01-2012 How do I get music to play as soon as the player enters the map? It's just ambient music, nothing special. RE: Music OnStart? - TeamSD - 10-01-2012 (10-01-2012, 09:34 AM)srobb Wrote: How do I get music to play as soon as the player enters the map? It's just ambient music, nothing special.void OnEnter() { PlayMusic("track_you_want_to_play.ogg", true, 2, 2, 0, true); } RE: Music OnStart? - srobb - 10-01-2012 main (8, 1) : ERR : Unexpected token '{' Line 8 is just '{'. void OnEnter() { PlayMusic("29_amb.ogg", true, 2, 2, 0, true); } RE: Music OnStart? - TeamSD - 10-01-2012 (10-01-2012, 10:11 AM)srobb Wrote: main (8, 1) : ERR : Unexpected token '{'Could you show me your whole script. RE: Music OnStart? - FlawlessHappiness - 10-01-2012 void OnStart() { } void OnEnter() { PlayMusic("29_amb.ogg", true, 2, 2, 0, true); } void OnLeave() { } This should make no problem at all... It must've been something your script RE: Music OnStart? - srobb - 10-01-2012 ////Onstartmap void OnStart() { } void OnEnter() { PlayMusic("29_amb.ogg", true, 2, 2, 0, true); } Still won't work. It says "main (13, 1) : ERR: Unexpected token '{'. Line 13 is just a {. I don't get what I've done wrong? Everything was working fine until I put the PlayMusic script in. RE: Music OnStart? - i3670 - 10-01-2012 Can you post the whole script, please? RE: Music OnStart? - srobb - 10-01-2012 Nevermind, I got it working. Thanks ![]() |