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
Amnesia scripting!! Removing item ONLY if in inventory?
AtraNox Offline
Junior Member

Posts: 10
Threads: 4
Joined: Apr 2013
Reputation: 0
#1
Amnesia scripting!! Removing item ONLY if in inventory?

I'd like to place a dagger in my map ("ceremony_knife"), but only for aesthetic purposes.. So I wanted to know if anybody knows a way to make the item not pickable, or, if it's not possible, to put a script that removes the knife from the inventory when you pick it up! Thank you very much and i hope my english is comprehensible! Big Grin
(This post was last modified: 04-11-2013, 03:00 PM by AtraNox.)
04-10-2013, 06:52 PM
Find
Streetboat Offline
Posting Freak

Posts: 1,099
Threads: 40
Joined: Mar 2011
Reputation: 56
#2
RE: Amnesia scripting!! Removing item ONLY if in inventory?

OnEnter()
{
SetEntityInteractionDisabled("ceremony_knife", true);
}

[Image: signature-2.png]
(This post was last modified: 04-10-2013, 09:11 PM by Streetboat.)
04-10-2013, 09:11 PM
Find
AtraNox Offline
Junior Member

Posts: 10
Threads: 4
Joined: Apr 2013
Reputation: 0
#3
RE: Amnesia scripting!! Removing item ONLY if in inventory?

(04-10-2013, 09:11 PM)Streetboat Wrote: OnEnter()
{
SetEntityInteractionDisabled("ceremony_knife", true);
}

Thank you very much, this will be very useful! I couldn't find anything on the internet, so this will be helpful also to other people (i hope)!
Thank you again Big Grin
P.S.: I'll put your name in the credits, my story will be called "Monsters", but I've just started so I need some time to finish it! Big Grin
(This post was last modified: 04-11-2013, 03:04 PM by AtraNox.)
04-11-2013, 03:02 PM
Find
VeNoMzTeamHysterical Offline
Member

Posts: 240
Threads: 36
Joined: Dec 2012
Reputation: 3
#4
RE: Amnesia scripting!! Removing item ONLY if in inventory?

(04-11-2013, 03:02 PM)AtraNox Wrote:
(04-10-2013, 09:11 PM)Streetboat Wrote: OnEnter()
{
SetEntityInteractionDisabled("ceremony_knife", true);
}

Thank you very much, this will be very useful! I couldn't find anything on the internet, so this will be helpful also to other people (i hope)!
Thank you again Big Grin
P.S.: I'll put your name in the credits, my story will be called "Monsters", but I've just started so I need some time to finish it! Big Grin

If you like to have custom text you need to work in the LANG file Wink
If you dont know i can tell you how you can change the title and description

http://www.frictionalgames.com/forum/thread-21719.html
Evil Awaking Work In Progress!
Hours Spend 472.
04-15-2013, 08:28 AM
Website Find
AtraNox Offline
Junior Member

Posts: 10
Threads: 4
Joined: Apr 2013
Reputation: 0
#5
RE: Amnesia scripting!! Removing item ONLY if in inventory?

(04-15-2013, 08:28 AM)VeNoMzTeamHysterical Wrote:
(04-11-2013, 03:02 PM)AtraNox Wrote:
(04-10-2013, 09:11 PM)Streetboat Wrote: OnEnter()
{
SetEntityInteractionDisabled("ceremony_knife", true);
}

Thank you very much, this will be very useful! I couldn't find anything on the internet, so this will be helpful also to other people (i hope)!
Thank you again Big Grin
P.S.: I'll put your name in the credits, my story will be called "Monsters", but I've just started so I need some time to finish it! Big Grin

If you like to have custom text you need to work in the LANG file Wink
If you dont know i can tell you how you can change the title and description
No thanks I already know how to do it! Smile
04-15-2013, 08:21 PM
Find
Streetboat Offline
Posting Freak

Posts: 1,099
Threads: 40
Joined: Mar 2011
Reputation: 56
#6
RE: Amnesia scripting!! Removing item ONLY if in inventory?

http://wiki.frictionalgames.com/hpl2/amn..._functions this should help in the future Smile

[Image: signature-2.png]
04-16-2013, 12:22 AM
Find
FlawlessHappiness Offline
Posting Freak

Posts: 3,980
Threads: 145
Joined: Mar 2012
Reputation: 171
#7
RE: Amnesia scripting!! Removing item ONLY if in inventory?

(04-10-2013, 06:52 PM)AtraNox Wrote: I'd like to place a dagger in my map ("ceremony_knife"), but only for aesthetic purposes.. So I wanted to know if anybody knows a way to make the item not pickable, or, if it's not possible, to put a script that removes the knife from the inventory when you pick it up! Thank you very much and i hope my english is comprehensible! Big Grin

Back to the first question:

Disabling interaction will not make it into a not-item. This means it will still have a blue glow around it.

What you can do it to back up the files, open it in the model editor, and make it an object instead of an item, in UserDefined Variables

Trying is the first step to success.
04-16-2013, 09:37 AM
Find
AtraNox Offline
Junior Member

Posts: 10
Threads: 4
Joined: Apr 2013
Reputation: 0
#8
RE: Amnesia scripting!! Removing item ONLY if in inventory?

(04-16-2013, 12:22 AM)Streetboat Wrote: http://wiki.frictionalgames.com/hpl2/amn..._functions this should help in the future Smile
I already known this site, but I didn't find what I was looking for.. I'll be more careful next time xD

(04-16-2013, 09:37 AM)BeeKayK Wrote:
(04-10-2013, 06:52 PM)AtraNox Wrote: I'd like to place a dagger in my map ("ceremony_knife"), but only for aesthetic purposes.. So I wanted to know if anybody knows a way to make the item not pickable, or, if it's not possible, to put a script that removes the knife from the inventory when you pick it up! Thank you very much and i hope my english is comprehensible! Big Grin

Back to the first question:

Disabling interaction will not make it into a not-item. This means it will still have a blue glow around it.

What you can do it to back up the files, open it in the model editor, and make it an object instead of an item, in UserDefined Variables
Thank you, I'll do that! Smile
(This post was last modified: 04-16-2013, 03:03 PM by AtraNox.)
04-16-2013, 03:03 PM
Find




Users browsing this thread: 1 Guest(s)