I'm getting pretty ticked here since this should be a basic frickin' command and I'm probably missing something simple. All I want to do is have the player fill a bucket with oil, and have the empty bucket be replaced with a full bucket in the inventory.......
void FUNCTION1(string &in item, string &in door)
{
RemoveItem("wooden_bucket_1");
PlaySoundAtEntity("", "ui_use_oil.snt", "Player", 0, false);
GiveItem("wooden_bucket_filled.ent");
}
//////////
void FUNCTION2(string &in item, string &in door)
{
RemoveItem("wooden_bucket_filled_1");
PlaySoundAtEntity("", "ui_use_oil.snt", "lever_simple01_1", 0, false);
AddPlayerSanity(10);
SetPropStaticPhysics("lever_simple01_1", false);
}
I have also tried:
GiveItem("wooden_bucket_filled");
GiveItem("wooden_bucket_filled_1");
But the game never loads and comes up with an error and is getting me frustrated. I've already looked at scripts wiki and frankly looks like a glob of colored text.
void GiveItem(string& asName, string& asType, string& asSubTypeName, string& asImageName, float afAmount);
doesn't help.
-----------------------------------
EDIT:
FIXED IT. -.-
Just had to write
GiveItemFromFile("wooden_bucket_filled_1", "wooden_bucket_filled.ent");
to give me a filled bucket of water.