How to remove Item (Entity)? - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html) +---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html) +---- Thread: How to remove Item (Entity)? (/thread-20742.html) Pages:
1
2
|
RE: How to remove Item (Entity)? - ehovda321 - 03-15-2013 (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. 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); } } RE: How to remove Item (Entity)? - Your Computer - 03-16-2013 (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. RE: How to remove Item (Entity)? - ehovda321 - 03-16-2013 (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 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. |