Frictional Games Forum (read-only)
Paintings disappearing but not re-appearing - 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 - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Paintings disappearing but not re-appearing (/thread-17855.html)



Paintings disappearing but not re-appearing - i3670 - 08-20-2012

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);
}
}

}


RE: Paintings disappearing but not re-appearing - Your Computer - 08-20-2012

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


RE: Paintings disappearing but not re-appearing - i3670 - 08-20-2012

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