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
Script Help why wont this work?
oscar1007 Offline
Member

Posts: 64
Threads: 24
Joined: Oct 2011
Reputation: 0
#1
why wont this work?

So, the player har a jar in his inventory, now when he uses that on a body part of a dead grunt, i want the player to get a different jar (filled with blood). This is my script:


void OnStart()
{
AddUseItemCallback("", "hollow_needle_1", "grunt_body_part2_1", "take_blood", true);
}


void take_blood(string &in asItem, string &in asEntity)
{
GiveSanityBoostSmall();
RemoveItem("glass_container_1");
GiveItem("", "glass_container_blood_1", "glass_container_blood_1", "glass_container_blood_1.tga", 1.0f);
}


The "glass_container_blood_1" is in the map, i just placed it so the player cant get it.

And, when i try to use the jar in game, nothing happens. It says cant use item this way or something.

Why wont this script work?

Thanks!

Money can't buy you happiness. But I rather cry in my ferrari.

PROJECT:
http://www.moddb.com/mods/oscar1007
01-28-2012, 02:31 PM
Find


Messages In This Thread
why wont this work? - by oscar1007 - 01-28-2012, 02:31 PM
RE: why wont this work? - by palistov - 01-28-2012, 02:49 PM
RE: why wont this work? - by oscar1007 - 01-28-2012, 04:22 PM
RE: why wont this work? - by palistov - 01-28-2012, 06:15 PM



Users browsing this thread: 1 Guest(s)