Frictional Games Forum (read-only)

Full Version: Paintings disappearing but not re-appearing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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);
}
}

}
You shouldn't expect callbacks to work on deactivated entities.
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