Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do you reset items after death?
Author Message
GrAVit Offline
Senior Member

Posts: 322
Joined: Oct 2011
Reputation: 4
Post: #1
How do you reset items after death?
Hey, I'm trying to figure out how to reset items after you die. I have a checkpoint set up, and I'm trying to use
SetEntityActive("key_study_1", true);
without success so far.

I've managed to reset doors with
ResetProp("mansion_1")
and monsters with SetEntityActive.

Any help on the matter? I want my key to be active, not set active from an unactive state.

06-07-2012 02:36 PM
Find all posts by this user Quote this message in a reply
Traggey Offline
The Doctor

Posts: 1,941
Joined: Feb 2012
Reputation: 109
Post: #2
RE: How do you reset items after death?
Moving thread to development support.

06-07-2012 03:01 PM
Find all posts by this user Quote this message in a reply
GrAVit Offline
Senior Member

Posts: 322
Joined: Oct 2011
Reputation: 4
Post: #3
RE: How do you reset items after death?
Thought this was in Development Support?

Yeah nevermind, looks like I forgot to post it in the correct sub-forum.

(This post was last modified: 06-07-2012 03:03 PM by GrAVit.)
06-07-2012 03:02 PM
Find all posts by this user Quote this message in a reply
Rapture Offline
Senior Member

Posts: 722
Joined: May 2011
Reputation: 18
Post: #4
RE: How do you reset items after death?
For the "CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);" --- When it calls the function on death/respawn, have it do some bool checks.

Try a "bool HasItem(string& asName);" --- If false, give the specific item you want. If they already have it, do nothing.

Hope that helps.
06-07-2012 03:06 PM
Find all posts by this user Quote this message in a reply
GrAVit Offline
Senior Member

Posts: 322
Joined: Oct 2011
Reputation: 4
Post: #5
RE: How do you reset items after death?
(06-07-2012 03:06 PM)Rapture Wrote:  For the "CheckPoint (string& asName, string& asStartPos, string& asCallback, string& asDeathHintCat, string& asDeathHintEntry);" --- When it calls the function on death/respawn, have it do some bool checks.

Try a "bool HasItem(string& asName);" --- If false, give the specific item you want. If they already have it, do nothing.

Hope that helps.
Yeah but I'd like the item to reset on the map, like I never even picked it up. The danger of death appears only after one picks up the key. I know how to get rid of it in the inventory aswell.

(This post was last modified: 06-07-2012 03:09 PM by GrAVit.)
06-07-2012 03:08 PM
Find all posts by this user Quote this message in a reply
Rapture Offline
Senior Member

Posts: 722
Joined: May 2011
Reputation: 18
Post: #6
RE: How do you reset items after death?
Oh, I misunderstood.

The "ResetProp(string& asName);" should work for the key right?

And if you picked the Key up, just do a bool again and check for it in your Inventory and remove it if its true.
06-07-2012 03:20 PM
Find all posts by this user Quote this message in a reply
GrAVit Offline
Senior Member

Posts: 322
Joined: Oct 2011
Reputation: 4
Post: #7
RE: How do you reset items after death?
(06-07-2012 03:20 PM)Rapture Wrote:  Oh, I misunderstood.

The "ResetProp(string& asName);" should work for the key right?

And if you picked the Key up, just do a bool again and check for it in your Inventory and remove it if its true.
Nah, ResetProp doesn't work for items.

06-07-2012 03:21 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)