Jump to content

stdExtra.zh

Overview
Creator: MoscowModder Updated: 18 Mar 2015 Tags: Library Downloads: 242
Rating[?]: Rating: 3.5/5 (1 rating)
View Script Download Script
(5.77 KB)
Information

Description Setup Reviews Comments

Orithan  

Edited 23 July 2015 - 06:23 PM
I uncovered a bug with this function:

//Gives the specified item with hold up animation and optional fanfare
//keep: Whether to actually give the item
//twoHand: Use 1 or 2 hand animation
//sfx: Whether to play item fanfare
void holdUpItem(int id, bool keep, bool twoHand, bool sfx)
{
	if ( sfx )
		Game->PlaySound(SFX_PICKUP);
	if ( twoHand )
		Link->Action = LA_HOLD2LAND;
	else
		Link->Action = LA_HOLD1LAND;
	Link->HeldItem = id;
	
	//Give the item and its counter effects
	if(keep){
		Link->Item[id] = true;
		itemdata data = Game->LoadItemData(id);
		//Increase capacity
		if(data->MaxIncrement > 0 && data->Max > Game->MCounter[data->Counter]){
			Game->MCounter[data->Counter] = Min(Game->MCounter[data->Counter]+data->MaxIncrement, data->Max);
		}
		//Increase count
		if(data->Amount > 0)
			Game->Counter[data->Counter] = Min(Game->Counter[data->Counter]+data->Amount, Game->MCounter[data->Counter]);
	}
}
When giving Link an item that increases amount and uses the Drain Counter (Blue Rupee in this case), I don't get the correct counter increment. Giving a Blue Rupee through this appears to immediately max out Link's Rupee counter instead of gradually giving him 5 Rupees.
 

Mani Kanina  

Edited 28 April 2015 - 06:08 PM
It would be nice if the required script files:
string.zh
ffcscript.zh
Were either added to the script database (and linked too from the description, for even easier access!) or included into the library itself. It should help streamline things. I'm currently searching the forums for the string one. *shrug*

edit: durrr, string is packed in with ZC.
 

Orithan  

Posted 16 April 2015 - 06:49 PM
So, is there supposed to be documentation for this library?
 

Mero  

Edited 25 July 2014 - 09:44 PM
This is wrong.
//Toggles weapon blockability by adjusting its direction
int toggleBlock (int dir)
{
    if(dir <  dir |= 8;
    else dir &= ~8;
    return dir;
}
Look at __NormalizeDir(int dir) in common.zh in the ghost_zh folder for the correct directions.