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 doesn't resume after enemy despawns
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#1
Music doesn't resume after enemy despawns

I have it so that when I use the PlayMusic function, the bool Resume value is true. Why does my music not resume after the monster spawns, runs at you, and then despawns?

void PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);

That's the syntax for quick reference

Dark Seclusion Here
04-29-2012, 10:05 AM
Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#2
RE: Music doesn't resume after enemy despawns

(04-29-2012, 10:05 AM)FragdaddyXXL Wrote: I have it so that when I use the PlayMusic function, the bool Resume value is true. Why does my music not resume after the monster spawns, runs at you, and then despawns?

void PlayMusic(string& asMusicFile, bool abLoop, float afVolume, float afFadeTime, int alPrio, bool abResume);

That's the syntax for quick reference
PlayMusic("i'm a ogg file", true, 1, 1, 1, true);


??

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
04-29-2012, 02:17 PM
Website Find
SilentStriker Offline
Posting Freak

Posts: 950
Threads: 26
Joined: Jul 2011
Reputation: 43
#3
RE: Music doesn't resume after enemy despawns

I have my PlayMusic on enter so it always starts when I enter the map, same goes with monsters etc Smile

this was also my 600th post ^^

(This post was last modified: 04-29-2012, 02:20 PM by SilentStriker.)
04-29-2012, 02:19 PM
Find
jessehmusic Offline
Senior Member

Posts: 423
Threads: 102
Joined: Dec 2011
Reputation: 8
#4
RE: Music doesn't resume after enemy despawns

(04-29-2012, 02:19 PM)SilentStriker Wrote: I have my PlayMusic on enter so it always starts when I enter the map, same goes with monsters etc Smile

this was also my 600th post ^^
haha Gratz Smile Post Freak Big Grin Tongue , btw have you made the logo ? etc etc

http://www.moddb.com/mods/jessehmusic - Hospital of horror , WIP
04-29-2012, 02:22 PM
Website Find
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#5
RE: Music doesn't resume after enemy despawns

PlayMusic("Threnody for the victims of Hiroshima", false, 0.8f, 0.1f, 0, true);

My music begins after interaction with a script box. Now, when the monster is active, naturally the enemy music begins to play. When he despawns, the enemy music stops, but my music does not resume. It's kinda lame because this is a ~8min piece.

Dark Seclusion Here
04-29-2012, 02:34 PM
Find
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#6
RE: Music doesn't resume after enemy despawns

Am I missing the meaning of Resume in the parameters? The wiki page fails to describe it.

Dark Seclusion Here
04-30-2012, 01:40 PM
Find
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#7
RE: Music doesn't resume after enemy despawns

(04-30-2012, 01:40 PM)FragdaddyXXL Wrote: Am I missing the meaning of Resume in the parameters? The wiki page fails to describe it.
Never used this function, but my guess is that WHEN you start to play the music again, HPL2 has saved the position of where the song was cut off the last time it played, instead of it starting over from the beginning. You need to manually play the song again.


Noob scripting tutorial: From Noob to Pro

04-30-2012, 06:43 PM
Find
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#8
RE: Music doesn't resume after enemy despawns

What I have figured out is that I can have the song begin automatically after the enemy despawns, but at a cost: the song starts from the beginning. This happens when the resume value is true and the loop value is true. If the loop value is false, nothing happens after the enemy despawns. I'll look into manually triggering the song.

Dark Seclusion Here
04-30-2012, 07:25 PM
Find
Juby Away
Senior Member

Posts: 290
Threads: 2
Joined: May 2011
Reputation: 5
#9
RE: Music doesn't resume after enemy despawns

(04-30-2012, 07:25 PM)FragdaddyXXL Wrote: What I have figured out is that I can have the song begin automatically after the enemy despawns, but at a cost: the song starts from the beginning. This happens when the resume value is true and the loop value is true. If the loop value is false, nothing happens after the enemy despawns. I'll look into manually triggering the song.
That is...... strange.
What happens if you change the priority to 1?


Insanity. Static.
05-01-2012, 01:27 AM
Find
FragdaddyXXL Offline
Member

Posts: 136
Threads: 20
Joined: Apr 2012
Reputation: 7
#10
RE: Music doesn't resume after enemy despawns

Right now, I have the priority now set to 7, just to see if that was affecting it. That didn't work :[
EDIT:
Triggering the music after the monster despawns also has it start from the beginning. I guess it's not possible to start where you were. If I was really desperate, I could just create a bunch of music files, all starting at different points in the song and use timers to figure out which version of the song to play. Too much work.

Dark Seclusion Here
(This post was last modified: 05-01-2012, 07:14 AM by FragdaddyXXL.)
05-01-2012, 05:29 AM
Find




Users browsing this thread: 1 Guest(s)