Frictional Games Forum (read-only)
Fading entities - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: Fading entities (/thread-21842.html)



Fading entities - Hauken - 06-16-2013

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.


RE: Fading entities - DeAngelo - 06-16-2013

http://wiki.frictionalgames.com/hpl2/amnesia/script_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


RE: Fading entities - Daemian - 06-16-2013

I love how your link says my nickname "amn...functions" xD


RE: Fading entities - PutraenusAlivius - 06-16-2013

(06-16-2013, 06:00 AM)DeAngelo Wrote: http://wiki.frictionalgames.com/hpl2/amnesia/script_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.


RE: Fading entities - FlawlessHappiness - 06-16-2013

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


RE: Fading entities - Your Computer - 06-16-2013

(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."


RE: Fading entities - FlawlessHappiness - 06-16-2013

Ah. Great! Thanks.


RE: Fading entities - Hauken - 06-16-2013

(06-16-2013, 06:00 AM)DeAngelo Wrote: http://wiki.frictionalgames.com/hpl2/amnesia/script_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.


RE: Fading entities - FlawlessHappiness - 06-16-2013

Bool abActive.
It means you either put false, or true.
That's what the error probably says too


RE: Fading entities - PutraenusAlivius - 06-17-2013

(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.