Frictional Games Forum (read-only)

Full Version: Script Entity Object fade in - help please
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
SetPropActiveAndFade(string& asName, bool abActive, float afFadeTime);

You're missing your boolean value. You need to put true or false in the second field.
That did not work at all. Can anybody provide the code to have 2 entity's fade in "appear" upon a trigger. Thanks.
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
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...
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.
How do I do that?