Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Entity Object fade in - help please
jssjr90 Offline
Member

Posts: 169
Threads: 39
Joined: Jun 2011
Reputation: 0
#1
Thumbs Up  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
Find
palistov Offline
Posting Freak

Posts: 1,208
Threads: 67
Joined: Mar 2011
Reputation: 57
#2
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
Find
jssjr90 Offline
Member

Posts: 169
Threads: 39
Joined: Jun 2011
Reputation: 0
#3
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
Find
xtron Offline
Senior Member

Posts: 402
Threads: 37
Joined: May 2011
Reputation: 2
#4
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

[Image: 44917299.jpg]Dubstep <3
07-12-2011, 10:43 AM
Find
jssjr90 Offline
Member

Posts: 169
Threads: 39
Joined: Jun 2011
Reputation: 0
#5
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
Find
DRedshot Offline
Senior Member

Posts: 374
Threads: 23
Joined: Jun 2011
Reputation: 11
#6
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
Find
jssjr90 Offline
Member

Posts: 169
Threads: 39
Joined: Jun 2011
Reputation: 0
#7
RE: Script Entity Object fade in - help please

How do I do that?
07-13-2011, 07:18 PM
Find




Users browsing this thread: 1 Guest(s)