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
DaAinGame Offline
Member

Posts: 90
Threads: 11
Joined: Mar 2012
Reputation: 4
#2
RE: removeitem not working for lantern.

Use the level editor name of the lantern, so unless you changed it, it should be "RemoveItem("lantern_1");
I would change the name of the item to something else though to prevent bugs later on if you will allow for a second lantern to be picked up. So rename the first one to something like: "Lantern01" then use RemoveItem("Lantern01");

If you continue to have issues please contact me so I can help!

Realm Of Another Chapter 1: http://www.frictionalgames.com/forum/thread-14142.html
Realm Of Another Chapter 2: Postponed
Adder Halls: 5%
06-18-2012, 04:05 AM
Find
Matt201496 Offline
Junior Member

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

thanks worked perfectly!
06-18-2012, 04:43 AM
Find




Users browsing this thread: 1 Guest(s)