My "Play Music" behaviour doesn't work on Ad Hoc, but works in Creator and iOS Viewer
Hymloe
Member Posts: 1,653
I'm creating a Free version of my old game Rad Skater Apocalypse, and I'm having trouble with the Play Music behaviour.
When my player dies, it switches to a new track (using an attribute) and then does a Play Music.
I am also popping up a banner ad at this time (when the player dies).
Works fine in Creator, works fine in the iOS Viewer. But when I make an Ad Hoc build... when the player dies, the music stops. SFX keep playing, the ad works, but no music.
When I die again, the music often starts again.
Any idea what is going on there?
I've tried offsetting the banner ad by about two seconds, using a timer, in case it was "getting in the way". But that doesn't seem to help.
Very frustrating, as it really doesn't make sense.
Has this happened to anyone else?
When my player dies, it switches to a new track (using an attribute) and then does a Play Music.
I am also popping up a banner ad at this time (when the player dies).
Works fine in Creator, works fine in the iOS Viewer. But when I make an Ad Hoc build... when the player dies, the music stops. SFX keep playing, the ad works, but no music.
When I die again, the music often starts again.
Any idea what is going on there?
I've tried offsetting the banner ad by about two seconds, using a timer, in case it was "getting in the way". But that doesn't seem to help.
Very frustrating, as it really doesn't make sense.
Has this happened to anyone else?
Comments
You said that if you die a second time the music starts again, that sounds like it could be something wrong in the code. Look at the code that switches the attribute, that's where I'd start.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
There must be something in the newer version of Game Salad that doesn't like the logic.
I'm going like this...
Group: Go to next music track
If CurrentMusic =1
PlayMusic "Music2"
CurrentMusic =2
OTHERWISE
If CurrentMusic =2
PlayMusic "Music3"
CurrentMusic =3
OTHERWISE
If CurrentMusic =3
PlayMusic "Music1"
CurrentMusic =1
And what seems to be happening, is that Music1 works, but the other two don't.
What's weird is that, every time you die, it does increment the attribute CurrentMusic, so it's obviously passing through the rules properly. But the PlayMusic behaviours don't seem to trigger at the same time.
Maybe I'll just try deleting and re-adding those PlayMusic behaviours. Maybe it's just being weird because it's an old project or something.
It's pretty frustrating spending hours late at night fixing something that really doesn't seem to be broken.
So. Annoying.
- try pulling the play music and put in something like spawn actor
- try getting rid of the nested rules
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
I've moved it from one actor to another.
I've added two more attributes that work as switches, just to really simplify and level out the behaviours (I un-nested them).
All work the same. Fine on the Creator and iOS Viewer, but on the AdHoc build, only Music track 1 works.
I just... I'm at a loose end. Why? WHY is this how it is? OH well...
Constantly uploading and downloading the build to the Game Salad servers just stretches out this process x 100.
Absolutely ridiculous.
I'm trying to PLAY MUSIC.
It works 100% in the Viewer, exactly as it has ALWAYS WORKED in the game I shipped a year ago.
It just doesn't make sense that this wouldn't work in the Ad Hoc builds. But I've made about 15 builds tonight, and I'm getting nowhere.
Are the track not playing because they're not loaded the same in an Ad Hoc build or something?
I've re-saved the files out as M4As, and reimported them a few times.
I've redone the behaviours for it.
I'm using Game Salad Daily 00.52. Is that a problem?
I've been doing AdHocs for my latest game, and all the music and everything is working fine in that.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Woke up, still thinking about it. Figured it must just be something glitchy in the system.
Renamed source music files. Re-imported as new names. Deleted old ones.
Made a new attribute to use.
Rebuilt the logic from scratch throughout.
Works.
Must have ben something lingering around about a music ID getting lost, or something. I have no idea. The only solution seemed to be to just backtrack to the start, and build the system again.
Thanks for your patience and help @jonmulcahy.
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
I'm experiencing the same issue here. Tried deleting and re-installing etc.... no luck.
Found the answer--- change your MP3 to WAV.
Or, convert your WAV's and MP3's to .M4A.