Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Music and dying
Author Message
Bennick Offline
Member

Posts: 75
Joined: Apr 2011
Reputation: 0
Post: #1
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
Find all posts by this user Quote this message in a reply
Nuke928 Offline
Junior Member

Posts: 7
Joined: Mar 2012
Reputation: 0
Post: #2
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
Visit this user's website Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,475
Joined: Jul 2011
Reputation: 234
Post: #3
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.

Tutorials: From Noob to Pro
04-24-2012 11:18 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Bennick Offline
Member

Posts: 75
Joined: Apr 2011
Reputation: 0
Post: #4
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
Find all posts by this user Quote this message in a reply
Datguy5 Offline
Senior Member

Posts: 621
Joined: Dec 2011
Reputation: 12
Post: #5
RE: Music and dying

I always put my music in OnStart

04-25-2012 07:27 PM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,475
Joined: Jul 2011
Reputation: 234
Post: #6
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.

Tutorials: From Noob to Pro
04-25-2012 08:01 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Bennick Offline
Member

Posts: 75
Joined: Apr 2011
Reputation: 0
Post: #7
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
Find all posts by this user Quote this message in a reply
Bennick Offline
Member

Posts: 75
Joined: Apr 2011
Reputation: 0
Post: #8
RE: Music and dying

Can anyone help?

Fratricide (title not finalized): 2/7 maps. :D
05-01-2012 10:44 PM
Find all posts by this user Quote this message in a reply
Your Computer Offline
SCAN ME!

Posts: 3,475
Joined: Jul 2011
Reputation: 234
Post: #9
RE: Music and dying

(05-01-2012 10:44 PM)Bennick Wrote:  Can anyone help?

Do you know how to use callbacks?

Tutorials: From Noob to Pro
05-01-2012 11:04 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Bennick Offline
Member

Posts: 75
Joined: Apr 2011
Reputation: 0
Post: #10
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
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)