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
Paintings disappearing but not re-appearing
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#1
Paintings disappearing but not re-appearing

The script is only 50% functional. The paintings only disappear when I look at them but they won't re-appear when I'm not looking.



void PaintingDisappear(string &in asEntity, int alState)
{
if (alState == 1)
{
for(int i=1;i<=12;i++){
SetPropActiveAndFade("insane_painting_"+i+"", false, 1.0f);
}
}
if(alState == -1)
{
for(int i=1;i<=12;i++){
SetPropActiveAndFade("insane_painting_"+i+"", true, 1.0f);
}
}

}

"What you think is irrelevant" - A character of our time

A Christmas Hunt
(This post was last modified: 08-20-2012, 01:10 AM by i3670.)
08-20-2012, 12:25 AM
Find
Your Computer Offline
SCAN ME!

Posts: 3,456
Threads: 32
Joined: Jul 2011
Reputation: 235
#2
RE: Paintings disappearing but not re-appearing

You shouldn't expect callbacks to work on deactivated entities.

Tutorials: From Noob to Pro
08-20-2012, 12:30 AM
Website Find
i3670 Offline
Posting Freak

Posts: 1,308
Threads: 74
Joined: Oct 2011
Reputation: 36
#3
RE: Paintings disappearing but not re-appearing

So the game doesn't recognize me looking at the unactivated entities. I suppose that if I make a script area in front of the painting and script that it will solve it.

EDIT: Yep, that did the trick. Thanks My Computer

"What you think is irrelevant" - A character of our time

A Christmas Hunt
(This post was last modified: 08-20-2012, 12:47 AM by i3670.)
08-20-2012, 12:36 AM
Find




Users browsing this thread: 1 Guest(s)