Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to remove Item (Entity)?
ehovda321 Offline
Junior Member

Posts: 38
Threads: 22
Joined: Dec 2011
Reputation: 0
#11
RE: How to remove Item (Entity)?

(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);
}
}
(This post was last modified: 03-15-2013, 11:25 PM by ehovda321.)
03-15-2013, 11:15 PM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#12
RE: How to remove Item (Entity)?

(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.

Tutorials: From Noob to Pro
03-16-2013, 12:06 AM
Website Find
ehovda321 Offline
Junior Member

Posts: 38
Threads: 22
Joined: Dec 2011
Reputation: 0
#13
RE: How to remove Item (Entity)?

(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.
(This post was last modified: 03-16-2013, 06:10 AM by ehovda321.)
03-16-2013, 01:02 AM
Find




Users browsing this thread: 1 Guest(s)