Frictional Games Forum (read-only)

Full Version: How to remove Item (Entity)?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(03-14-2013, 09:06 PM)Your Computer Wrote: [ -> ]You're supposed to provide the (internal) name of the item, not the file name, to RemoveItem. If the item was picked up from the environment, then it should be the entity name. If it was given through a script, then you were the one that gave it a name.

Also, 700+ lines of code for a merchant script? That sounds absurd.


I know right? I'm sure there is an easier way to do this... but actually I have 3000+ lines of script... hahahahaha! Wait, have you made a merchant script? If so- it would be awesome to take a look at for a future reference! :3

But, here is the tricky part - I'm using 160 different billboards to show the player the store stock OR how much they have - with that, I need to provide 160 box lights. I have to do codes like this too - hundreds of times:

if(HasItem("battery_25"))
{
if(GetGlobalVarInt("Rb") == 0)
{
RemoveItem("battery_25");
AddGlobalVarInt("Rb", 1);
}
}
(03-15-2013, 11:15 PM)ehovda321 Wrote: [ -> ]Wait, have you made a merchant script? If so- it would be awesome to take a look at for a future reference! :3

I haven't made one, but there is one available in http://www.frictionalgames.com/forum/thread-15749.html with a tutorial and video demonstration.
(03-16-2013, 12:06 AM)Your Computer Wrote: [ -> ]
(03-15-2013, 11:15 PM)ehovda321 Wrote: [ -> ]Wait, have you made a merchant script? If so- it would be awesome to take a look at for a future reference! :3

I haven't made one, but there is one available in http://www.frictionalgames.com/forum/thread-15749.html with a tutorial and video demonstration.

Yes, I know - I saw that add-on and watched the video tutorial. This does not support what I am doing though. I am doing a much more complicated script (w/ the 160 billboards + 160 box lights), plus in his Merchant Plugin - you can only "BUY", I want the player to "BUY" and "SELL".

EDIT: and Actually - It's only 2000 lines, I reduced some functions using for() loop statements.
Pages: 1 2