I wanted to make an event when the player uses a glass jar on an Area, so he leaves the jar on the ground to fill it with dripping oil.
First of all, how can I do it so the player can use an item on an Area? It just doesn't highlight the item when I come close to the area with the item equipped.
Well I couldnt figure this out so I tried out using it on a hatch just to see if the rest worked. But the rest didn't work.
this is under void OnStart:
AddUseItemCallback("", "container1", "hatch_metal01_2", "JarUsed", false);
then
void JarUsed (string &in asItem, string &in asEntity)
{
StartPlayerLookAt("Jar1", 3, 3, "");
RemoveItem("container1");
AddTimer("111", 2, "TimerLookAtEvents");
}
Firstsly, when I used the jar on the hatch, it simply disappeared and he wouldnt even look at the Jar1 Area. Then I played around with the code and it ended up like it is above, but now when I try to use the jar on the hatch, it won't even use it, it says "Cannot use the item this way" and nothing happens.
Its weird because I used the same drill when you use a key on a door, and it works. I learned it from the video tutorial on the wiki on how to use a key on a door.
Can someone help me out? I'm lost
[/code]