The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
function not working, is something wrong?
Tryed Offline
Junior Member

Posts: 10
Threads: 3
Joined: Feb 2011
Reputation: 0
#1
function not working, is something wrong?

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 Sad[/code]
02-14-2011, 04:09 PM
Find


Messages In This Thread
function not working, is something wrong? - by Tryed - 02-14-2011, 04:09 PM



Users browsing this thread: 1 Guest(s)