Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support | Shelf | Store

Privacy Policy


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Entity Object fade in - help please
Author Message
jssjr90 Offline
Member

Posts: 124
Joined: Jun 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
palistov Offline
Posting Freak

Posts: 1,175
Joined: Mar 2011
Reputation: 56
Post: #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 all posts by this user Quote this message in a reply
jssjr90 Offline
Member

Posts: 124
Joined: Jun 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
xtron Offline
Senior Member

Posts: 402
Joined: May 2011
Reputation: 2
Post: #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 all posts by this user Quote this message in a reply
jssjr90 Offline
Member

Posts: 124
Joined: Jun 2011
Reputation: 0
Post: #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 all posts by this user Quote this message in a reply
DRedshot Offline
Senior Member

Posts: 373
Joined: Jun 2011
Reputation: 11
Post: #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 all posts by this user Quote this message in a reply
jssjr90 Offline
Member

Posts: 124
Joined: Jun 2011
Reputation: 0
Post: #7
RE: Script Entity Object fade in - help please
How do I do that?
07-13-2011 07:18 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)