| 
		
	
		| Bennick   Member
 
 Posts: 77
 Threads: 27
 Joined: Apr 2011
 Reputation: 
0
 | 
			| Music and dying 
 
				Hey guys, I know how to add music such that it plays and all works fine, provided you never die. I think I'm missing something here, because whenever you die, the music either stops playing, or goes to the music file that was played in the previous area. What's going on here? is it perhaps a difference between putting PlayMusic in OnStart or OnEnter?
			 
 Fratricide (title not finalized): 2/7 maps. :D |  |  
	| 04-24-2012, 06:27 PM |  |  
	
		| Nuke928   Junior Member
 
 Posts: 7
 Threads: 2
 Joined: Mar 2012
 Reputation: 
0
 | 
			| RE: Music and dying 
 
				Yes, there IS a difference between putting music in OnStart or OnEnter. You have to put it in OnEnter because it is called IF YOU SPAWN. OnStart is only called on the BEGINNING and ONLY ONE TIME.
			 |  |  
	| 04-24-2012, 08:29 PM |  |  
	
		| Your Computer   SCAN ME!
 
 Posts: 3,456
 Threads: 32
 Joined: Jul 2011
 Reputation: 
235
 | 
			| RE: Music and dying 
 
				OnEnter is not called when you spawn after dying. The current active checkpoint, however, is (the game automatically creates a checkpoint at the start of the map). Nevertheless, you should play your music in OnEnter.
			 
 |  |  
	| 04-24-2012, 11:18 PM |  |  
	
		| Bennick   Member
 
 Posts: 77
 Threads: 27
 Joined: Apr 2011
 Reputation: 
0
 | 
			| RE: Music and dying 
 
				 (04-24-2012, 11:18 PM)Your Computer Wrote:  OnEnter is not called when you spawn after dying. The current active checkpoint, however, is (the game automatically creates a checkpoint at the start of the map). Nevertheless, you should play your music in OnEnter. Wait, so playing the music in OnEnter will restart it when I spawn after death? What if my level has multiple checkpoints? How does the game set checkpoints? 
			 
 Fratricide (title not finalized): 2/7 maps. :D 
				
(This post was last modified: 04-25-2012, 07:22 PM by Bennick.)
 |  |  
	| 04-25-2012, 07:22 PM |  |  
	
		| Datguy5   Senior Member
 
 Posts: 629
 Threads: 25
 Joined: Dec 2011
 Reputation: 
12
 | 
			| RE: Music and dying 
 
				I always put my music in OnStart
			 
 |  |  
	| 04-25-2012, 07:27 PM |  |  
	
		| Your Computer   SCAN ME!
 
 Posts: 3,456
 Threads: 32
 Joined: Jul 2011
 Reputation: 
235
 | 
			| RE: Music and dying 
 
				 (04-25-2012, 07:22 PM)Bennick Wrote:  Wait, so playing the music in OnEnter will restart it when I spawn after death? What if my level has multiple checkpoints? How does the game set checkpoints? 
I did not say playing the music in OnEnter would restart the music when spawning after death.
 
The game automatically sets one checkpoint when you first enter the map. You can set your own checkpoints by using the CheckPoint function. Only one checkpoint can be active at any one time.
			 
 |  |  
	| 04-25-2012, 08:01 PM |  |  
	
		| Bennick   Member
 
 Posts: 77
 Threads: 27
 Joined: Apr 2011
 Reputation: 
0
 | 
			| RE: Music and dying 
 
				 (04-25-2012, 08:01 PM)Your Computer Wrote:   (04-25-2012, 07:22 PM)Bennick Wrote:  Wait, so playing the music in OnEnter will restart it when I spawn after death? What if my level has multiple checkpoints? How does the game set checkpoints? I did not say playing the music in OnEnter would restart the music when spawning after death.
 
 The game automatically sets one checkpoint when you first enter the map. You can set your own checkpoints by using the CheckPoint function. Only one checkpoint can be active at any one time.
 Okay, but I still don't understand. How do I get it so that the music that was playing when the new checkpoint was set plays after death and respawn? 
			 
 Fratricide (title not finalized): 2/7 maps. :D |  |  
	| 04-25-2012, 11:28 PM |  |  
	
		| Bennick   Member
 
 Posts: 77
 Threads: 27
 Joined: Apr 2011
 Reputation: 
0
 | 
			| RE: Music and dying 
 
				Can anyone help?
			 
 Fratricide (title not finalized): 2/7 maps. :D |  |  
	| 05-01-2012, 10:44 PM |  |  
	
		| Your Computer   SCAN ME!
 
 Posts: 3,456
 Threads: 32
 Joined: Jul 2011
 Reputation: 
235
 | 
			| RE: Music and dying 
 
				 (05-01-2012, 10:44 PM)Bennick Wrote:  Can anyone help? 
Do you know how to use callbacks?
			 
 |  |  
	| 05-01-2012, 11:04 PM |  |  
	
		| Bennick   Member
 
 Posts: 77
 Threads: 27
 Joined: Apr 2011
 Reputation: 
0
 | 
			| RE: Music and dying 
 
				 (05-01-2012, 11:04 PM)Your Computer Wrote:   (05-01-2012, 10:44 PM)Bennick Wrote:  Can anyone help? Do you know how to use callbacks?
 Yessir, most of the different kinds anyway. Would it be some kind of repeating callback where whenever you spawn in the area it restarts the music? That sounds wrong just typing it lol. 
			 
 Fratricide (title not finalized): 2/7 maps. :D |  |  
	| 05-02-2012, 11:19 PM |  |  |