JetlinerX 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 599 
	Threads: 49 
	Joined: Jun 2011
	
 Reputation: 
19
		
	 | 
	
		
			
Stop Music/Sound? 
			 
			
				Hey all. 
So, I have an ambiance that I made, and added as music. It starts on Map 1, and I want it to be disabled on Map 3. Here is my script, but it WONT STOP!    
void OnEnter () 
{ 
        AddEntityCollideCallback("Player", "ScriptArea_2", "Startscare", true, 1); 
} 
void Startscare(string &in asParent, string &in asChild, int alState) 
{ 
        SetPlayerActive(false); 
        GiveSanityBoost(); 
        AddTimer("", 1, "Faint"); 
}     
 
void Faint(string &in asTimer) 
{ 
        StopMusic(1.0f, 1); 
        StopSound("Map1Ambiance.ogg", 1.0f); 
        SetPlayerMoveSpeedMul(1); 
        SetPlayerLookSpeedMul(1); 
        FadePlayerRollTo(50, 33, 33); 
        SetPlayerCrouching(true); 
        PlaySoundAtEntity("", "player_bodyfall.snt", "Player", 0, true); 
        FadeOut(3.0f); 
        AddTimer("", 10, "Gettingup"); 
} 
void Gettingup(string &in asTimer) 
{ 
        FadeIn(7.0f); 
        FadePlayerRollTo(0, 33, 33); 
        PlaySoundAtEntity("", "react_sigh.snt", "Player", 0, false); 
        AddTimer("", 7, "Scare"); 
} 
void Scare(string &in asTimer) 
{ 
        StartPlayerLookAt("level_hub_1", 15.0f, 15.0f, ""); 
        PlaySoundAtEntity("", "05_event_door_bang.snt", "Player", 0, false); 
        CreateParticleSystemAtEntity("", "ps_dust_impact", "Particals", false);     
        CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Particals", false); 
        AddTimer("", 1.0f, "Bang2"); 
} 
void Bang2(string &in asTimer) 
{ 
        CreateParticleSystemAtEntity("", "ps_dust_impact", "Particals", false);     
        CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Particals", false); 
        AddTimer("", 1.0f, "Bang3"); 
} 
void Bang3(string &in asTimer) 
{ 
        CreateParticleSystemAtEntity("", "ps_dust_impact", "Particals", false);     
        CreateParticleSystemAtEntity("", "ps_door_damage_wood", "Particals", false); 
        AddTimer("", 2.0f, "Monster"); 
} 
void Monster(string &in asTimer) 
{ 
        PlaySoundAtEntity("", "notice_long.snt", "Player", 0, false); 
        AddTimer("", 4.0f, "React"); 
} 
void React(string &in asTimer) 
{ 
        PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false); 
        SetPlayerActive(true); 
        StopPlayerLookAt(); 
}
  
			 
			
			
 
			
				
(This post was last modified: 03-31-2012, 07:49 AM by JetlinerX.)
 
				
			 
		 |  
	 
 | 
 
	| 03-31-2012, 01:41 AM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: Stop Music/Sound? 
			 
			
				Check your priorities.  
			 
			
			
 
			
		 |  
	 
 | 
 
	| 03-31-2012, 02:05 AM  | 
	
		
	 | 
 
 
	
		
		JetlinerX 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 599 
	Threads: 49 
	Joined: Jun 2011
	
 Reputation: 
19
		
	 | 
	
		
			
RE: Stop Music/Sound? 
			 
			
				I tried 0 as well, no luck. 
			 
			
			
 
			
		 |  
	 
 | 
 
	| 03-31-2012, 02:13 AM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: Stop Music/Sound? 
			 
			
				Don't do random priorities; you're supposed to provide the same priority you used when you first played the song.
			 
			
			
 
			
		 |  
	 
 | 
 
	| 03-31-2012, 02:28 AM  | 
	
		
	 | 
 
 
	
		
		JetlinerX 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 599 
	Threads: 49 
	Joined: Jun 2011
	
 Reputation: 
19
		
	 | 
	
		
			
RE: Stop Music/Sound? 
			 
			
				I did 0 on start, and 0 to stop. Not turning off still. 
 
All fixed, and working.  
 
/thread. 
			 
			
			
 
			
				
(This post was last modified: 03-31-2012, 07:48 AM by JetlinerX.)
 
				
			 
		 |  
	 
 | 
 
	| 03-31-2012, 02:39 AM  | 
	
		
	 | 
 
 
	 
 |