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 removeitem not working for lantern.
Matt201496 Offline
Junior Member

Posts: 11
Threads: 4
Joined: Jun 2012
Reputation: 0
#1
removeitem not working for lantern.

I just want the lantern to be removed from the inventory after changing the map.Tried having just removeitem under void OnStart as well. Thought useing a timer might work , but it doesn't do anything. The only thing that happens is it puts the lantern away, but if i use the debug menu to reload the map it works.

////////////////////////////
// Run when the map starts


void OnStart()
{
SetLanternActive(false,true);
AddTimer("",1,"RemoveLantern");
AutoSave();
}

void RemoveLantern(string &in asTimer)
{
RemoveItem("lantern");
}
06-18-2012, 03:46 AM
Find


Messages In This Thread
removeitem not working for lantern. - by Matt201496 - 06-18-2012, 03:46 AM



Users browsing this thread: 1 Guest(s)