Jump to content

Too many items Edit "Question on Camp items."


Reichwulfe

Recommended Posts

Well, I've been toying around with a custom variant of the Too many items mod, posted by Milk.

But when it comes to spawning, Tenpegs,TentKits, or tents themselves,

the game seemingly ignores the spawn input?.

So If someone would be willing to look over the code and tell me what is wrong,

it would be greatly appreciated.

 

 

 

getCore()
getPlayer()
 
--F1 Is For Tools
--F2 Is For Building Supplies
 
function AddItem(Character)
if isKeyDown(Keyboard.KEY_1) and
isKeyDown(Keyboard.KEY_F1) then
character:getInventory():AddItem("Base.Hammer");
end
if isKeyDown(Keyboard.KEY_2) and
isKeyDown(Keyboard.KEY_F1) then
character:getInventory():AddItem("Base.Screwdriver");
end
if isKeyDown(Keyboard.KEY_3) and
isKeyDown(Keyboard.KEY_F1) then
character:getInventory():AddItem("Base.Sledgehammer");
end
if isKeyDown(Keyboard.KEY_4) and
isKeyDown(Keyboard.KEY_F1) then
character:getInventory():AddItem("Base.Saw");
end
if isKeyDown(Keyboard.KEY_1) and
isKeyDown(Keyboard.KEY_F2) then
character:getInventory():AddItem("Base.Nails");
end
if isKeyDown(Keyboard.KEY_2) and
isKeyDown(Keyboard.KEY_F2) then
character:getInventory():AddItem("Base.Plank");
end
if isKeyDown(Keyboard.KEY_3) and
isKeyDown(Keyboard.KEY_F2) then
character:getInventory():AddItem("Base.Sheet");
end
if isKeyDown(Keyboard.KEY_4) and
isKeyDown(Keyboard.KEY_F2) then
character:getInventory():AddItem("Base.TentPeg");
end
if isKeyDown(Keyboard.KEY_5) and
isKeyDown(Keyboard.KEY_F2) then
character:getInventory():AddItem("Base.CampingTent");
end
if isKeyDown(Keyboard.KEY_6) and
isKeyDown(Keyboard.KEY_F2) then
character:getInventory():AddItem("Base.CampingTentKit");
end
if isKeyDown(Keyboard.KEY_7) and
isKeyDown(Keyboard.KEY_F2) then
character:getInventory():AddItem("Base.Doorknob");
end
if isKeyDown(Keyboard.KEY_8) and
isKeyDown(Keyboard.KEY_F2) then
character:getInventory():AddItem("Base.Hinge");
end
end
Link to comment
Share on other sites

Thank you SOOOO Much Robomat!,

Shows what lack of sleep will do. x)

I completely didn't even notice I Miss-directed the read for the module!

And for Any future reference. to anyone else, make sure camping is lower case c.

otherwise it refuses to spawn anything.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...