Hauken 
 
 
		
			Member 
			
			
			
 
			
	Posts: 62 
	Threads: 19 
	Joined: Jul 2012
	
 Reputation: 
1
		
	 | 
	
		
			
Fading entities 
			 
			
				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.
			 
			
			
			
		 |  
	 
 | 
 
	| 06-16-2013, 02:40 AM  | 
	
		
	 | 
 
 
	
		
		DeAngelo 
 
 
		
			Senior Member 
			
			
			
 
			
	Posts: 263 
	Threads: 26 
	Joined: Feb 2013
	
 Reputation: 
11
		
	 | 
	
		
			
RE: Fading entities 
			 
			
				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
			  
			
			
 
			
				
(This post was last modified: 06-16-2013, 06:00 AM by DeAngelo.)
 
				
			 
		 |  
	 
 | 
 
	| 06-16-2013, 06:00 AM  | 
	
		
	 | 
 
 
	
		
		Daemian 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 1,129 
	Threads: 42 
	Joined: Dec 2012
	
 Reputation: 
49
		
	 | 
	
		
			
RE: Fading entities 
			 
			
				I love how your link says my nickname "amn...functions" xD
			 
			
			
 
			
		 |  
	 
 | 
 
	| 06-16-2013, 09:14 AM  | 
	
		
	 | 
 
 
	
		
		PutraenusAlivius 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 4,713 
	Threads: 75 
	Joined: Dec 2012
	
 Reputation: 
119
		
	 | 
	
		
			
RE: Fading entities 
			 
			
				 (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.
			  
			
			
 
"Veni, vidi, vici." 
"I came, I saw, I conquered." 
			
		 |  
	 
 | 
 
	| 06-16-2013, 09:59 AM  | 
	
		
	 | 
 
 
	
		
		FlawlessHappiness 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 3,980 
	Threads: 145 
	Joined: Mar 2012
	
 Reputation: 
171
		
	 | 
	
		
			
RE: Fading 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
			 
			
			
 
Trying is the first step to success. 
			
		 |  
	 
 | 
 
	| 06-16-2013, 10:47 AM  | 
	
		
	 | 
 
 
	
		
		Your Computer 
 
 
		
			SCAN ME! 
			
			
			
 
			
	Posts: 3,456 
	Threads: 32 
	Joined: Jul 2011
	
 Reputation: 
235
		
	 | 
	
		
			
RE: Fading entities 
			 
			
				 (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."
			  
			
			
 
			
		 |  
	 
 | 
 
	| 06-16-2013, 01:01 PM  | 
	
		
	 | 
 
 
	
		
		FlawlessHappiness 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 3,980 
	Threads: 145 
	Joined: Mar 2012
	
 Reputation: 
171
		
	 | 
	
		
			
RE: Fading entities 
			 
			
				Ah. Great! Thanks.
			 
			
			
 
Trying is the first step to success. 
			
		 |  
	 
 | 
 
	| 06-16-2013, 01:51 PM  | 
	
		
	 | 
 
 
	
		
		Hauken 
 
 
		
			Member 
			
			
			
 
			
	Posts: 62 
	Threads: 19 
	Joined: Jul 2012
	
 Reputation: 
1
		
	 | 
	
		
			
RE: Fading entities 
			 
			
				 (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.
			  
			
			
			
				
(This post was last modified: 06-16-2013, 02:24 PM by Hauken.)
 
				
			 
		 |  
	 
 | 
 
	| 06-16-2013, 02:17 PM  | 
	
		
	 | 
 
 
	
		
		FlawlessHappiness 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 3,980 
	Threads: 145 
	Joined: Mar 2012
	
 Reputation: 
171
		
	 | 
	
		
			
RE: Fading entities 
			 
			
				Bool abActive. 
It means you either put false, or true. 
That's what the error probably says too
			 
			
			
 
Trying is the first step to success. 
			
		 |  
	 
 | 
 
	| 06-16-2013, 07:41 PM  | 
	
		
	 | 
 
 
	
		
		PutraenusAlivius 
 
 
		
			Posting Freak 
			
			
			
 
			
	Posts: 4,713 
	Threads: 75 
	Joined: Dec 2012
	
 Reputation: 
119
		
	 | 
	
		
			
RE: Fading entities 
			 
			
				 (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.
			  
			
			
 
"Veni, vidi, vici." 
"I came, I saw, I conquered." 
			
		 |  
	 
 | 
 
	| 06-17-2013, 12:46 AM  | 
	
		
	 | 
 
 
	 
 |