Frictional Games Forum (read-only)

Full Version: Cant use my item on an area [SOLVED]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Try this.
go to your Getoilarea in your editor.
ans activate the item interaction.
hope this helps.
I'm not sure, but I think putting it in OnEnter is incorrect. Try put it at OnStart.
(05-31-2014, 12:23 PM)DnALANGE Wrote: [ -> ]Try this.
go to your Getoilarea in your editor.
ans activate the item interaction.
hope this helps.

Thanks

I just came back from a long pause, so totaly forgot about the ItemInteraction in the Area settings

Damn I'll do many facepalms before im done this story Smile
Np, good luck with your story.
for any other questions, were here.

ps, can you add solved in your tread, so ppl wont spend time in a solved tread.
Thanks
always does