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
#1
How to remove Item (Entity)?

Is it possible to do a function... something like this?

RemoveItem("potion_health.ent");

Can you do something similar to that?
(This post was last modified: 03-14-2013, 05:45 PM by ehovda321.)
03-14-2013, 05:42 PM
Find
tonitoni1998 Offline
Member

Posts: 163
Threads: 54
Joined: Oct 2012
Reputation: 1
#2
RE: How to remove Item (Entity)?

You mean from the inventory?

When you are looking for someone, to do the scripting for your Custom Story, ask me!
03-14-2013, 05:48 PM
Find
ehovda321 Offline
Junior Member

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

(03-14-2013, 05:48 PM)tonitoni1998 Wrote: You mean from the inventory?

Yes, I want to remove 1 .ent from the inventory (If you have 3 health potions - I want to remove 1)
03-14-2013, 05:50 PM
Find
tonitoni1998 Offline
Member

Posts: 163
Threads: 54
Joined: Oct 2012
Reputation: 1
#4
RE: How to remove Item (Entity)?

Well thats already what you have. Its RemoveItem(string asName);

All scripts are in the wiki http://wiki.frictionalgames.com/hpl2/amn..._functions Wink use F3 ctrl+f to browse the whole page.

When you are looking for someone, to do the scripting for your Custom Story, ask me!
03-14-2013, 05:54 PM
Find
ehovda321 Offline
Junior Member

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

(03-14-2013, 05:54 PM)tonitoni1998 Wrote: Well thats already what you have. Its RemoveItem(string asName);

All scripts are in the wiki http://wiki.frictionalgames.com/hpl2/amn..._functions Wink use F3 ctrl+f to browse the whole page.

Yeah, but bro- here's the problem, the RemoveItem(); function can not be used with an .ent at the end... Sad

(03-14-2013, 05:54 PM)tonitoni1998 Wrote: Well thats already what you have. Its RemoveItem(string asName);

All scripts are in the wiki http://wiki.frictionalgames.com/hpl2/amn..._functions Wink use F3 ctrl+f to browse the whole page.

and btw - I've already developed 3 custom stories, so I know where the script functions are... xD
(This post was last modified: 03-14-2013, 05:57 PM by ehovda321.)
03-14-2013, 05:56 PM
Find
tonitoni1998 Offline
Member

Posts: 163
Threads: 54
Joined: Oct 2012
Reputation: 1
#6
RE: How to remove Item (Entity)?

Oh :x sorry i thought you're a newbie Tongue

When you are looking for someone, to do the scripting for your Custom Story, ask me!
03-14-2013, 06:02 PM
Find
ehovda321 Offline
Junior Member

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

(03-14-2013, 06:02 PM)tonitoni1998 Wrote: Oh :x sorry i thought you're a newbie Tongue

No problem, thanks for your help. I'm developing a store in my mod, I've got everything set up- but when you "SELL" items, I want it to remove .ent files from your inventory.
03-14-2013, 06:05 PM
Find
tonitoni1998 Offline
Member

Posts: 163
Threads: 54
Joined: Oct 2012
Reputation: 1
#8
RE: How to remove Item (Entity)?

Nice idea actually.

When you are looking for someone, to do the scripting for your Custom Story, ask me!
03-14-2013, 06:08 PM
Find
ehovda321 Offline
Junior Member

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

(03-14-2013, 06:08 PM)tonitoni1998 Wrote: Nice idea actually.

Thanks! I've figured out what to do... but it's gonna add like 700 lines to my code... lol
03-14-2013, 06:12 PM
Find
Your Computer Offline
SCAN ME!

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

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.

Tutorials: From Noob to Pro
(This post was last modified: 03-14-2013, 09:06 PM by Your Computer.)
03-14-2013, 09:06 PM
Website Find




Users browsing this thread: 7 Guest(s)