Matt201496
Junior Member
Posts: 11
Threads: 4
Joined: Jun 2012
Reputation:
0
|
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 |
|
DaAinGame
Member
Posts: 90
Threads: 11
Joined: Mar 2012
Reputation:
4
|
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!
|
|
06-18-2012, 04:05 AM |
|
Matt201496
Junior Member
Posts: 11
Threads: 4
Joined: Jun 2012
Reputation:
0
|
RE: removeitem not working for lantern.
thanks worked perfectly!
|
|
06-18-2012, 04:43 AM |
|