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 do you reset items after death?
GrAVit Offline
Senior Member

Posts: 580
Threads: 15
Joined: Oct 2011
Reputation: 22
#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
Traggey Offline
is mildly amused

Posts: 3,257
Threads: 74
Joined: Feb 2012
Reputation: 185
#2
RE: How do you reset items after death?

Moving thread to development support.
06-07-2012, 03:01 PM
Find
GrAVit Offline
Senior Member

Posts: 580
Threads: 15
Joined: Oct 2011
Reputation: 22
#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
Rapture Offline
Posting Freak

Posts: 1,078
Threads: 79
Joined: May 2011
Reputation: 30
#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
GrAVit Offline
Senior Member

Posts: 580
Threads: 15
Joined: Oct 2011
Reputation: 22
#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
Rapture Offline
Posting Freak

Posts: 1,078
Threads: 79
Joined: May 2011
Reputation: 30
#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
GrAVit Offline
Senior Member

Posts: 580
Threads: 15
Joined: Oct 2011
Reputation: 22
#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




Users browsing this thread: 1 Guest(s)