jssjr90
Member
Posts: 169
Threads: 39
Joined: Jun 2011
Reputation:
0
|
Script Entity Object fade in - help please
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.
(This post was last modified: 07-12-2011, 02:50 AM by jssjr90.)
|
|
07-12-2011, 02:49 AM |
|
palistov
Posting Freak
Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation:
57
|
RE: Script Entity Object fade in - help please
SetPropActiveAndFade(string& asName, bool abActive, float afFadeTime);
You're missing your boolean value. You need to put true or false in the second field.
(This post was last modified: 07-12-2011, 03:28 AM by palistov.)
|
|
07-12-2011, 03:27 AM |
|
jssjr90
Member
Posts: 169
Threads: 39
Joined: Jun 2011
Reputation:
0
|
RE: Script Entity Object fade in - help please
That did not work at all. Can anybody provide the code to have 2 entity's fade in "appear" upon a trigger. Thanks.
|
|
07-12-2011, 08:06 AM |
|
xtron
Senior Member
Posts: 402
Threads: 37
Joined: May 2011
Reputation:
2
|
RE: Script Entity Object fade in - help please
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
Dubstep <3
|
|
07-12-2011, 10:43 AM |
|
jssjr90
Member
Posts: 169
Threads: 39
Joined: Jun 2011
Reputation:
0
|
RE: Script Entity Object fade in - help please
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...
|
|
07-13-2011, 01:04 AM |
|
DRedshot
Senior Member
Posts: 374
Threads: 23
Joined: Jun 2011
Reputation:
11
|
RE: Script Entity Object fade in - help please
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.
|
|
07-13-2011, 01:50 AM |
|
jssjr90
Member
Posts: 169
Threads: 39
Joined: Jun 2011
Reputation:
0
|
RE: Script Entity Object fade in - help please
How do I do that?
|
|
07-13-2011, 07:18 PM |
|
|