Frictional Games Forum (read-only)
Cant use my item on an area [SOLVED] - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Cant use my item on an area [SOLVED] (/thread-25396.html)



Cant use my item on an area [SOLVED] - Lizard - 05-31-2014

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


RE: Cant use my item on an area - DnALANGE - 05-31-2014

Try this.
go to your Getoilarea in your editor.
ans activate the item interaction.
hope this helps.


RE: Cant use my item on an area - PutraenusAlivius - 05-31-2014

I'm not sure, but I think putting it in OnEnter is incorrect. Try put it at OnStart.


RE: Cant use my item on an area [SOLVED] - Lizard - 05-31-2014

(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


RE: Cant use my item on an area - DnALANGE - 05-31-2014

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


RE: Cant use my item on an area [SOLVED] - Lizard - 05-31-2014

always does