Frictional Games Forum (read-only)
Script Entity Object fade in - help please - 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: Script Entity Object fade in - help please (/thread-9093.html)



Script Entity Object fade in - help please - jssjr90 - 07-12-2011

Well I want to have these 2 statues fade in or appear upon walking into a trigger area. The entity im using is "deformedman.ent" from the statues section. I have 2 of them behind a wall creating a shadow only illusion. But I want to fade them in when walking into a trigger. The problem is that the statue entity does not have a "Player Interact Call Back" function on the entity tab. So can someone help me on this script. This is what I have but it fails.

void OnStart()
{
AddEntityCollideCallback("Player" , "Shadowman" , "Shadowmovefunc" , true, 0);
}

//Shadow move func
void Shadowmovefunc(string &in asParent, string &in asChild, int alState)
{
SetPropActiveAndFade("ShadowmanA", "", 5);
SetPropActiveAndFade("ShadowmanB", "", 5);
}

The error I get that pops up is no matching signatures.

Help would be greatly appreciated.


RE: Script Entity Object fade in - help please - palistov - 07-12-2011

SetPropActiveAndFade(string& asName, bool abActive, float afFadeTime);

You're missing your boolean value. You need to put true or false in the second field.


RE: Script Entity Object fade in - help please - jssjr90 - 07-12-2011

That did not work at all. Can anybody provide the code to have 2 entity's fade in "appear" upon a trigger. Thanks.


RE: Script Entity Object fade in - help please - xtron - 07-12-2011

void OnStart()
{
AddEntityCollideCallback("Player" , "Shadowman" , "Shadowmovefunc" , true, 0);
}

//Shadow move func
void Shadowmovefunc(string &in asParent, string &in asChild, int alState)
{
SetPropActiveAndFade("ShadowmanA", true, 5);
SetPropActiveAndFade("ShadowmanB", true, 5);
}


;D


RE: Script Entity Object fade in - help please - jssjr90 - 07-13-2011

I see that i did not match the "Shadowmovefunc" fixed that, but good news and bad news, good news is that it does not crash so the code is "working" but the statues do not fade in "appear" hmmmm...


RE: Script Entity Object fade in - help please - DRedshot - 07-13-2011

i read about someone ellse having the same problem. The thing is, deformed man is a "static prop" which basically means it has no physics. static props cannot be scripted, just like static objects cannot be scripted, so the best solution would be to go into model editor, and change it to a non-static prop, and saveas new entity.


RE: Script Entity Object fade in - help please - jssjr90 - 07-13-2011

How do I do that?