[Custom Dungeon Issue] Music Bug??

Have trouble running Legend of Grimrock 2 or do you have questions about the purchasing options? Look for help here.
Post Reply
Chimeracorp
Posts: 11
Joined: Fri Jan 16, 2015 7:50 am

[Custom Dungeon Issue] Music Bug??

Post by Chimeracorp »

Alright so I'm having a bit of an issue and rather stumped on how to properly solve it.

I have a custom dungeon in the works, and I'm down to the second level's boss fight
Basically its a three tiered bossfight, requiring three bossfight nodes, for the bars and music mainly. Two waves of mummies before a skeleton commander drops from the ceiling and triggers a music change.

Now this all seemed easy enough, however the bossfight music takes a HALT after the first wave of four mummies. No matter what I've tried I cannot seem to get it to continue to play the generic boss music for the second wave and switch to the undead theme for the actual commander fight. The music just returns to the ambiance.

I can take screenshots of what is needed if you can help me solve this.

(also is this in the right board??)
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: [Custom Dungeon Issue] Music Bug??

Post by minmay »

Call GameMode.playStream("boss_fight_generic") to instantly change the music.

I seriously doubt you can get the same music track to continue between two boss fights, at best it will restart. But I don't see why you would need it to; when the last mummy in the first wave dies, just call BossFightComponent:addMonster() on each of new mummies, BossFightComponent:recomputeTotal(), and BossFightComponent:setBossName().
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Chimeracorp
Posts: 11
Joined: Fri Jan 16, 2015 7:50 am

Re: [Custom Dungeon Issue] Music Bug??

Post by Chimeracorp »

This worked for the wave system, but I'm not sure how to get the music to change. What do I fill in for Gamemode, exactly? Sorry I'm new to scripting in general, this is a learning experience
minmay
Posts: 2780
Joined: Mon Sep 23, 2013 2:24 am

Re: [Custom Dungeon Issue] Music Bug??

Post by minmay »

The line

Code: Select all

GameMode.playStream("boss_fight_generic")
will play the "boss_fight_generic" track. GameMode is a global table with several useful functions.
Grimrock 1 dungeon
Grimrock 2 resources
I no longer answer scripting questions in private messages. Please ask in a forum topic or this Discord server.
Post Reply