//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.
stdExtra.zh
Overview
Creator:
MoscowModder
Updated: 18 Mar 2015
Tags:
Library
Downloads: 242
|
View Script
Download Script (5.77 KB) |
Information
This library, stdExtra, is a collection of general-purpose constants, settings, and functions that can be used in a variety of different scripts.
Description Setup Reviews Comments
This library contains content by:
Important notes:
- Me
- aaa2
- Mero
Important notes:
- As of v 3.6.1 (10/26/15), the InvertedCircle() function will draw properly (at the right Y offset) on ZC 2.50.2 but incorrectly on earlier versions, rather than the other way around.


