Item::InventoryRemove()

General Chat, Comments
Post Reply
KaL
Posts: 344
Joined: Mon Jan 13, 2014 5:44 am

Item::InventoryRemove()

Post by KaL »

Ok I get Item::InventoryRemove('itemx',1) but what if I want to removed all the quantity for that "item x" How would I write this?
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: Item::InventoryRemove()

Post by a_bertrand »

I let you dig a bit...
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
KyleMassacre
Posts: 573
Joined: Wed Nov 27, 2013 12:42 pm

Re: Item::InventoryRemove()

Post by KyleMassacre »

KaL wrote:Ok I get Item::InventoryRemove('itemx',1) but what if I want to removed all the quantity for that "item x" How would I write this?
Maybe a little something like:

Code: Select all

Item::InventoryRemove('itemx',Item::OwnedNumber('itemx')); 
That could do the trick
KaL
Posts: 344
Joined: Mon Jan 13, 2014 5:44 am

Re: Item::InventoryRemove()

Post by KaL »

Thanks Kyle! I did give it a tried,Alain. I tried $quantity, 'quantity', {$obj->quantity} but I think I'll probably figure it out after a 3 weeks. Hahaha! :lol:
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: Item::InventoryRemove()

Post by a_bertrand »

Still, it would have forced you to READ what the code do, and actually learn. We can't code the game for you, you must invest the time and efforts to solve your first issues, and you will see that over the time things will be easier, otherwise you will not learn.
Creator of Dot World Maker
Mad programmer and annoying composer
KaL
Posts: 344
Joined: Mon Jan 13, 2014 5:44 am

Re: Item::InventoryRemove()

Post by KaL »

Yes, that is true! When i first came to NWE. I have no knowledge of how the backbone of the GUI works. After a few talks with Kyle, I've kinda get the concept of how the engine. The vision is clear now but it will take a little bit more time to figure out how each command works. I truly believe that i can't not be a programmer but more of a modifier. Well, atleast my game is moving forward, thanks to you guys. :D
Post Reply

Return to “General”