O Ilusionista
Captain 100K
Change Music Tempo + BOSS DYING MUSIC
Hi everyone. There is a kinda hidden code, discovered by CRxTRDude, which can controls the music speed.
So I've made two funcions using it - one for change the tempo and one for when the boss is dying
======CHANGE MUSIC TEMPO======
Copy this to your animationscript file:
Usage:
=====BOSS DYING MUSIC=====
Change the background music tempo to the desired value bases on how much life the entity has.
Copy this code to your animationscript file:
Usage:
I use this last code at idle and fall animations, you can even use it as a takedamagescript, but I do prefer to consume less memory.
NOTE:
The music tempo will remain altered until you change the music (by any way) or you end the stage.
To revert it back to the normal state, set the tempo to 100.
You can see this code in action here, at 11:25
https://www.youtube.com/watch?v=mOMbgfJ2t58
Hi everyone. There is a kinda hidden code, discovered by CRxTRDude, which can controls the music speed.
So I've made two funcions using it - one for change the tempo and one for when the boss is dying
======CHANGE MUSIC TEMPO======
Copy this to your animationscript file:
Code:
void bmtMusicTempo (int iRatio)
// Change the background music tempo to the desired value
// Normal ratio is 100. Higher the value, higher the tempo and vice versa.
// Douglas Baldan - 14.12.2016
{
setmusictempo(iRatio);
}
Usage:
This will speed up the current music in 20%. Normal ratio is 100. Higher the value, higher the tempo and vice versa.@cmd bmtMusicTempo 120
=====BOSS DYING MUSIC=====
Change the background music tempo to the desired value bases on how much life the entity has.
Copy this code to your animationscript file:
Code:
void bmtDeathMusicTempo (int iRatio, int iLife)
// Change the background music tempo to the desired value bases on how much life the entity has.
// Normal ratio is 100. Higher the value, higher the tempo and vice versa.
// Douglas Baldan - 14.12.2016
{
void self = getlocalvar("self"); // get caller
void life = getentityproperty(self,"health"); //get health
void maxlife = getentityproperty(self, "maxhealth"); // get max health
if (life<=maxlife/iLife)
{
setmusictempo(iRatio);
}
}
Usage:
The first value is the tempo change (in this case, 20% faster). The second value is the ratio of how much life the entity has - in this case, the code will trigger if the entity has 25% or less health (health / 4).@cmd bmtDeathMusicTempo 120 4
I use this last code at idle and fall animations, you can even use it as a takedamagescript, but I do prefer to consume less memory.
NOTE:
The music tempo will remain altered until you change the music (by any way) or you end the stage.
To revert it back to the normal state, set the tempo to 100.
You can see this code in action here, at 11:25
https://www.youtube.com/watch?v=mOMbgfJ2t58