how i do this, When i enter a area an music is played - 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 (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: how i do this, When i enter a area an music is played (/thread-4911.html) |
how i do this, When i enter a area an music is played - DeathbyNUKE - 10-04-2010 someone know how? RE: how i do this, When i enter a area an music is played - Soon - 10-04-2010 Start with creating a script area in the editor and name it whatever you want. Like area_music. Then your script should look something like this: void OnStart() { AddEntityCollideCallback("area_music", "MusicStart"); } void MusicStart(string &in asParent, string &in asChild, int alState) { PlayMusic("04_amb", true, 0.5, 4, 3, true); } Make sure the add entity collide callback is in the on start section of your script and the music start function you are calling is outside of On Start, On Enter, and On Leave. |