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
Problem with placing item script
Neurological Offline
Member

Posts: 71
Threads: 11
Joined: Sep 2010
Reputation: 1
#1
Problem with placing item script

I'm trying to do a script for make a static item appear on the map using another one from the inventory. But it refuses to work, so i'm clearly doing something wrong.

Here is what I have OnStart

AddUseItemCallback("", "neurocheese_poison_1", "AreaPlaceCheese", "ItemCheeseOnPlate", true);      

SetEntityActive("neurocheese_poisonstatic_1", false);

And thats the script that should run after I put the item:

void ItemCheeseOnPlate(string &in asItem, string &in asEntity)
{
    SetEntityActive("neurocheese_poisonstatic_1", true);
    
    RemoveItem(asItem);
    
    SetLocalVarInt("neurocheese_poisonstatic_1", 1);
}

So first I've putted the neurocheese_poisonstatic_1 on the map, thats what it should appear after putting the item from the inventory on the area. The problem is that I can't interact with the area I created, even if I check the InteractWithItem box.

Neurological - Music Entertainment
http://www.neuro-lab.net
10-04-2010, 01:02 AM
Find


Messages In This Thread
Problem with placing item script - by Neurological - 10-04-2010, 01:02 AM
RE: Problem with placing item script - by Luis - 10-04-2010, 07:46 AM
RE: Problem with placing item script - by Jordo76 - 10-05-2010, 09:43 PM
RE: Problem with placing item script - by Entih - 10-05-2010, 10:29 PM
RE: Problem with placing item script - by Entih - 10-06-2010, 01:10 AM
RE: Problem with placing item script - by Entih - 10-06-2010, 02:59 AM
RE: Problem with placing item script - by Entih - 10-06-2010, 03:14 AM
RE: Problem with placing item script - by Entih - 10-06-2010, 03:32 AM
RE: Problem with placing item script - by Entih - 10-06-2010, 10:23 PM



Users browsing this thread: 1 Guest(s)