Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Possible to make entities disappear?
genmills Offline
Junior Member

Posts: 47
Threads: 7
Joined: Mar 2011
Reputation: 0
#1
Possible to make entities disappear?

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
04-29-2011, 09:51 AM
Find
Kyle Offline
Posting Freak

Posts: 911
Threads: 36
Joined: Sep 2010
Reputation: 7
#2
RE: Possible to make entities disappear?

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
Find
genmills Offline
Junior Member

Posts: 47
Threads: 7
Joined: Mar 2011
Reputation: 0
#3
RE: Possible to make entities disappear?

(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...
04-29-2011, 04:44 PM
Find




Users browsing this thread: 1 Guest(s)