Frictional Games Forum (read-only)

Full Version: Please Read !
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a new, more challenging-to-fix problem after getting used to HPL and scripting. In amnesia, when the "goo" is created, it fades in. Whenever i try to get the goo active by using the script "SetEntityActive("(name)", true);", it just appears, instead of fading in Huh . I was wondering if there is a way to fix this. Your answer would be greatly appreciated.

Thanks Big Grin
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
you need to use
"SetPropActiveAndFade"

this will make it fade in and out instead of just appearing

if you need to find some code you dont know you can check the ones use in the game
(01-06-2013, 01:39 AM)stokesie95 Wrote: [ -> ]if you need to find some code you dont know you can check the ones use in the game

Or search this website: http://wiki.frictionalgames.com/hpl2/amn..._functions
(01-06-2013, 01:29 AM)beecake Wrote: [ -> ]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

okay thanks very muchSmile, but how do i position this code so that it will know which entity i want to set active?
SetPropActiveAndFade("GOO_NAME_IN_EDITOR", true, TIME_IN_SECONDS_UNTIL_IT_FADES);


Now if you want it to desappear, change the true for false.
asName = The entitiy (In most situations)
(01-06-2013, 09:21 PM)beecake Wrote: [ -> ]asName = The entitiy (In most situations)

alright thank you very much Big Grin

(01-06-2013, 09:19 PM)str4wberrypanic Wrote: [ -> ]SetPropActiveAndFade("GOO_NAME_IN_EDITOR", true, TIME_IN_SECONDS_UNTIL_IT_FADES);


Now if you want it to desappear, change the true for false.

thanks very much Big Grin