Possible to make entities disappear? - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html) +--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html) +--- Thread: Possible to make entities disappear? (/thread-7690.html) |
Possible to make entities disappear? - genmills - 04-29-2011 Hello again! I don't always like making a new thread when I have a question or two... but here it goes. I need to make a painting disappear, because I want the painting to change to a new one. I have a function that sets the inactive painting to active. Something like: SetEntityActive("painting2", true); And I was trying to make the first painting disappear with the same function. Something like: SetEntityActive("painting1", false); Is there a reason this doesn't work for some objects, and if that's the case, is there an alternative method I can use for changing what painting is on the wall? Sorry if this has been asked before, but when I use the search feature, like 100 threads come up unless I search with quotes, in which case no threads come up. Thanks! RE: Possible to make entities disappear? - Kyle - 04-29-2011 I had the same problem when it came to one of my scripts. I wanted the player to pull down a lever and for the secret door to open. I used a closet_metal to block the secret room. I would set one of the closets act and the other closet unactive. It worked, but I noticed that it doesn't work for all objects. I think I know how to help you in this situation. You can try different paintings like the ones that can be taken off the wall and use this code: SetEntityInteractionDisabled("painting1", true); SetEntityInteractionDisabled("painting2", true); You can put these in your "void OnStart()". RE: Possible to make entities disappear? - genmills - 04-29-2011 (04-29-2011, 10:51 AM)Kyle Wrote: I had the same problem when it came to one of my scripts. I wanted the player to pull down a lever and for the secret door to open. I used a closet_metal to block the secret room. I would set one of the closets act and the other closet unactive. It worked, but I noticed that it doesn't work for all objects. I think I know how to help you in this situation. You can try different paintings like the ones that can be taken off the wall and use this code: Ok, thanks! I'll give it a shot... |