05-31-2014, 12:15 PM
I have scripted for alittle while and I've done this script several times
Normally when you want to use an item on a area, door or what ever you wanna use it on it's icon brightens up
But someway, when I want to use my glass_container on an area nothing happens, the container icon dosen't even light up when im seleting the container and pointing it at the area.
Any one of you know why this happens.
Just to set things straight I'll leav my script so you can see that the scripts is up
void OnEnter()
{
PlayMusic("", true, 1, 1, 1, false);
PlaySoundAtEntity("OilSplash", "16_oil_drip.ogg", "OilSplashArea", 0, false);
AddUseItemCallback("", "glass_container_1", "GetOilArea", "GettingOil", true);
}
///////////////////
//BEGIN GettingOil
void GettingOil(string &in asItem, string &in asEntity)
{
GiveItem("glass_container_oil", "Puzzle", "GlassContainerOil", "glass_container_oil.tga", 1);
RemoveItem("glass_container_1");
}
//END GettingOil
///////////////////
And yes the names in the script and in the editor are the same
Normally when you want to use an item on a area, door or what ever you wanna use it on it's icon brightens up
But someway, when I want to use my glass_container on an area nothing happens, the container icon dosen't even light up when im seleting the container and pointing it at the area.
Any one of you know why this happens.
Just to set things straight I'll leav my script so you can see that the scripts is up
void OnEnter()
{
PlayMusic("", true, 1, 1, 1, false);
PlaySoundAtEntity("OilSplash", "16_oil_drip.ogg", "OilSplashArea", 0, false);
AddUseItemCallback("", "glass_container_1", "GetOilArea", "GettingOil", true);
}
///////////////////
//BEGIN GettingOil
void GettingOil(string &in asItem, string &in asEntity)
{
GiveItem("glass_container_oil", "Puzzle", "GlassContainerOil", "glass_container_oil.tga", 1);
RemoveItem("glass_container_1");
}
//END GettingOil
///////////////////
And yes the names in the script and in the editor are the same