Stop music - 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: Stop music (/thread-8473.html) Pages:
1
2
|
Stop music - xtron - 06-06-2011 What's the code, when the player reaches a specific area the music stops. I can't get the: Code: void StopMusic(float afFadeTime, int alPrio); EDIT: This doesn't seems to work :O. any ideas? Code: void func_piano1_disapear(string &in asEntity, int alState) RE: Stop music - Tanshaydar - 06-06-2011 alPrio should be same. RE: Stop music - xtron - 06-06-2011 (06-06-2011, 11:52 AM)Tanshaydar Wrote: alPrio should be same. "should be same", what do you mean, should it stay like "int alPrio"? RE: Stop music - Tanshaydar - 06-06-2011 You wrote: PlayMusic("05_event_steps.ogg", false, 80, 0, 10, false); Here, alPrio is 10. When you use StopMusic, you should write like this: StopMusic( 0, 10); RE: Stop music - xtron - 06-06-2011 Ok thanks ^^. Btw, can you check why my second script aint working?. I edited my first post. RE: Stop music - Tanshaydar - 06-06-2011 TimerDestroyPiano1 TimerDestoryPiano1 Function and timer names are not same. Destroy - Destory RE: Stop music - xtron - 06-06-2011 (06-06-2011, 12:14 PM)Tanshaydar Wrote: TimerDestroyPiano1 Oh. I'm so stupid xD Thanks ! <3 It doesn't work...is the function right? the "(string &in asEntity, int alState)" EDIT!: I got it working (solution: (string &in asParent, string &in asChild, int alState) as function) But now when I enter the script the piano doesn't explode :S. Code: SetPropHealth("piano1", -100); RE: Stop music - Tanshaydar - 06-06-2011 void func_piano1_disapear(string &in asEntity, int alState) I don't know where or why you call it. This phrase: "(string &in asEntity, int alState)" is used for state changes, like wheels or levers. RE: Stop music - xtron - 06-06-2011 Oh thanks. asEntity is the if there's an entity involved? and what is "string &in asParent, string &in asChild"? RE: Stop music - Tanshaydar - 06-06-2011 "string &in asParent, string &in asChild, int alState" is for collide callbacks. Parent is the entity to collide, like player or a grunt; Child is entity or area or whatever to be collided. State, 1 for entering -1 for exiting. |