FragdaddyXXL
Member
Posts: 136
Threads: 20
Joined: Apr 2012
Reputation:
7
|
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
|
|
04-29-2012, 10:05 AM |
|
jessehmusic
Senior Member
Posts: 423
Threads: 102
Joined: Dec 2011
Reputation:
8
|
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);
??
|
|
04-29-2012, 02:17 PM |
|
SilentStriker
Posting Freak
Posts: 950
Threads: 26
Joined: Jul 2011
Reputation:
43
|
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
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 |
|
jessehmusic
Senior Member
Posts: 423
Threads: 102
Joined: Dec 2011
Reputation:
8
|
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
this was also my 600th post ^^ haha Gratz Post Freak , btw have you made the logo ? etc etc
|
|
04-29-2012, 02:22 PM |
|
FragdaddyXXL
Member
Posts: 136
Threads: 20
Joined: Apr 2012
Reputation:
7
|
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.
|
|
04-29-2012, 02:34 PM |
|
FragdaddyXXL
Member
Posts: 136
Threads: 20
Joined: Apr 2012
Reputation:
7
|
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.
|
|
04-30-2012, 01:40 PM |
|
Cranky Old Man
Posting Freak
Posts: 986
Threads: 20
Joined: Apr 2012
Reputation:
38
|
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.
|
|
04-30-2012, 06:43 PM |
|
FragdaddyXXL
Member
Posts: 136
Threads: 20
Joined: Apr 2012
Reputation:
7
|
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.
|
|
04-30-2012, 07:25 PM |
|
Juby
Senior Member
Posts: 290
Threads: 2
Joined: May 2011
Reputation:
5
|
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 |
|
FragdaddyXXL
Member
Posts: 136
Threads: 20
Joined: Apr 2012
Reputation:
7
|
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.
(This post was last modified: 05-01-2012, 07:14 AM by FragdaddyXXL.)
|
|
05-01-2012, 05:29 AM |
|
|