Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Music and dying
Bennick Offline
Member

Posts: 77
Threads: 27
Joined: Apr 2011
Reputation: 0
#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
Nuke928 Offline
Junior Member

Posts: 7
Threads: 2
Joined: Mar 2012
Reputation: 0
#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
Website Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#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
Website Find
Bennick Offline
Member

Posts: 77
Threads: 27
Joined: Apr 2011
Reputation: 0
#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
Datguy5 Offline
Senior Member

Posts: 629
Threads: 25
Joined: Dec 2011
Reputation: 12
#5
RE: Music and dying

I always put my music in OnStart

04-25-2012, 07:27 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#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
Website Find
Bennick Offline
Member

Posts: 77
Threads: 27
Joined: Apr 2011
Reputation: 0
#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
Bennick Offline
Member

Posts: 77
Threads: 27
Joined: Apr 2011
Reputation: 0
#8
RE: Music and dying

Can anyone help?

Fratricide (title not finalized): 2/7 maps. :D
05-01-2012, 10:44 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#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
Website Find
Bennick Offline
Member

Posts: 77
Threads: 27
Joined: Apr 2011
Reputation: 0
#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




Users browsing this thread: 1 Guest(s)