Frictional Games Forum (read-only)

Full Version: Fading entities
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi

im trying to create guardian slime event, the only thing i miss in my script is that the slime fade and dont just spawn in your face, i understand it has something to do with Prop fade (I belive) and I've read the frictionals script for it but thats just way to hardcoded for me to understand, does anyone know the code by head that could post here?

Thanks.
http://wiki.frictionalgames.com/hpl2/amn..._functions

This page is your new best friend.

The particular script you want is:

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


Activates/deactivates a prop.
asName - internal name
abActive - nothing to add
afFadeTime - time in seconds until prop fully fades
I love how your link says my nickname "amn...functions" xD
(06-16-2013, 06:00 AM)DeAngelo Wrote: [ -> ]http://wiki.frictionalgames.com/hpl2/amn..._functions

This page is your new best friend.

The particular script you want is:

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


Activates/deactivates a prop.
asName - internal name
abActive - nothing to add
afFadeTime - time in seconds until prop fully fades

Hey, this parameter is only useable by props. Props ARE NOT entities.
Correct, but nearly all entities in the entities folder, are props. If it doesn't work, like with the hanging shirt, then you have to change its variables in the model editor from static, to object
(06-16-2013, 09:59 AM)JustAnotherPlayer Wrote: [ -> ]Hey, this parameter is only useable by props. Props ARE NOT entities.

All props are entities, but not every entity is a prop. Props are normally entities that can receive damage and therefore can "break."
Ah. Great! Thanks.
(06-16-2013, 06:00 AM)DeAngelo Wrote: [ -> ]http://wiki.frictionalgames.com/hpl2/amn..._functions

This page is your new best friend.

The particular script you want is:

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


Activates/deactivates a prop.
asName - internal name
abActive - nothing to add
afFadeTime - time in seconds until prop fully fades
..

Yes I've found that code before this post but I just get an error.

void slimefunc(string &in asParent, string &in asChild, int alState)

{
//SetEntityActive("slime_wall", true);
SetPropActiveAndFade("slime_wall", 0, 3);
PlaySoundAtEntity("", "guardian_activated3.snt", "Player", 0, false);
PlaySoundAtEntity("", "react_scare.snt", "Player", 0, false);
GiveSanityDamage(9.0f, true);
}

This is me at least trying.
Bool abActive.
It means you either put false, or true.
That's what the error probably says too
(06-16-2013, 07:41 PM)BeeKayK Wrote: [ -> ]Bool abActive.
It means you either put false, or true.
That's what the error probably says too

Really? The Engine Scripts page is really mis-leading.