Frictional Games Forum (read-only)

Full Version: How do you reset items after death?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
Code:
SetEntityActive("key_study_1", true);
without success so far.

I've managed to reset doors with
Code:
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.
Moving thread to development support.
Thought this was in Development Support?

Yeah nevermind, looks like I forgot to post it in the correct sub-forum.
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)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.
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)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.