get currently music name/path

Unfortunately no. When I made this music switch Easter Egg, I had to track the last selection in order to create a loop cycle. Here is the function that does it. Since the trigger entity (an invisible obstacle over the boombox) doesn't need most things like Jugglepoints and such, I used those values as free tracking variables and in turn used those variables to read in the tracks from a text file.

http://youtu.be/WMH7knXt0UY

Code:
void musi0001(void vEnt, int iNotch){

	/*
    musi0001
    Damon Vaughn Caskey
    12292010
	Cycle music tracks using passed entity's guard and juggle points value.

	vEnt: Target entity.  	
    */

	int		iMH, iND, iAG;									//Target entity's max guardpoints, nodrop, and aggression settings.
	char	cTrack;											//Music track name.

	if(!vEnt){	vEnt = getlocalvar("self");	}				//If no entity passed use caller.
		
	iAG	=	getentityproperty(vEnt, "aggression");			//Get aggression (row).
	iND	=	getentityproperty(vEnt, "nodrop");				//Get nodrop (colmun).
	iMH	=	getentityproperty(vEnt, "maxhealth");			//Get health (sound).

	if(iND < 1){	iND = 1;	}							//Failsafe column to 1.

	cTrack = file0001(8, "music", ""+iAG+"", iND);			//open music file and get argument.
	
	if(!cTrack)												//Argument null or invalid?
	{		
		iND = 1;											//Reset column.
		cTrack = file0001(8, "music", ""+iAG+"", iND);		//Try getting track again.
	}

	if(cTrack)												//Track found?
	{
		if(iMH)
		{
			soun0005(vEnt, iMH, -1, 1, 0, 0);				//Play sound effect.
		}
		playmusic("data/music/" + cTrack + ".bor", 1);		//Apply the track.
	}
	
	changeentityproperty(vEnt, "nodrop", iND+iNotch);		//Increment or decrement jugglepoints for next call.
}

And an excerpt of the text file it reads to get the track name:

Code:
Model
1 SoundB Estrada boss boss2
End
 
Mmm...
Thanks DC by the way for the moment I'm bypassing this issue using playmusic() in levelscript storing the track into a globalvar =(

Ps. I scripted a continue countdown if there is no player in game ;)
 
I do speak Spanish, albeit not very well. I've never had any Portuguese, but I know there are a lot of similarities between them.

As for Estrada, it's just the name of the track, taken from Tekken Dark Resurrection. Full name is "estrada da estrela". In English I'd interpret it as Road of The Stars.

DC
 
Back
Top Bottom