Frictional Games Forum (read-only)

Full Version: Possible to make entities disappear?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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. Sad

Thanks! Big Grin
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()".
(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:

SetEntityInteractionDisabled("painting1", true);
SetEntityInteractionDisabled("painting2", true);

You can put these in your "void OnStart()".

Ok, thanks! I'll give it a shot...