Roenlond 
			Senior Member0  
	
		
			
RE: extra_english now is working, but I need help with a different script :) 
 
				void OnStart()
{
AddEntityCollideCallback("servant_grunt_1", "monstergone_area", "MonsterGone", true, 1);
}
void MonsterGone(string &in asParent, string &in asChild, int alState)
{
FadeEnemyToSmoke("servant_grunt_1", "songfile");
}
When "servant_grunt_1" collides with "monstergone_area", run the gone function 
 That should work, unless I messed something up.
			
 
 
 
	05-12-2011, 03:59 PM  
		
	 
 
	
		RawkBandMan 
			Posting Freak5  
	
		
			
RE: extra_english now is working, but I need help with a different script :) 
 
				 (05-12-2011, 03:59 PM) Roenlond Wrote:  
Thanks! Will try when I get the chance.
What songfile should I use though? Can I just leave it blank if I don't want it to make a sound?
			
 
			
			
I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets. 
			
		 
 
 
	05-13-2011, 12:26 AM  
		
	 
 
	
		RawkBandMan 
			Posting Freak5  
	
		
			
RE: extra_english now is working, but I need help with a different script :) 
 
				Bumpity Bump Bump!
			
			
			
I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets. 
			
		 
 
 
	05-15-2011, 07:38 PM  
		
	 
 
	
		Roenlond 
			Senior Member0  
	
		
			
RE: extra_english now is working, but I need help with a different script :) 
 
				Oh sorry, don't know what I was thinking.
			
			
			
		 
 
 
	05-15-2011, 08:54 PM  
		
	 
 
	
		RawkBandMan 
			Posting Freak5  
	
		
			
RE: extra_english now is working, but I need help with a different script :) 
 
				 (05-15-2011, 08:54 PM) Roenlond Wrote:  
Ah Alright. Thanks. Once I can complete that little part of my map, place the area's and path nodes and stuff, I will test this.
			
 
			
			
I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets. 
			
		 
 
 
	05-15-2011, 09:41 PM  
		
	 
 
	
		RawkBandMan 
			Posting Freak5  
	
		
			
RE: extra_english now is working, but I need help with a different script :) 
 
				 (05-08-2011, 08:31 PM) Roenlond Wrote:  
Also with this, can I make it so it's when I collide with a entity/door/area? would it be like this?
I think I'm getting better at this 
EDIT: also, getting a crash with  a different map.
FATAL ERROR: Could not load script file Cells4.hps!
main(2,1) : ERR : Expected "," or ";"
main(18,1) : ERR : Unexpected token "{"
main(29,1) : ERR : Unexpected token "{"
main(60,1) : ERR : Unexpected token "{"
I checked my hps, and those lines are correct (As far as I know.)
my hps
Spoiler below!  
 
 
			 
			
			
I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets. 
			
				
(This post was last modified: 05-17-2011, 03:14 PM by RawkBandMan .) 
 
				
			 
		 
 
 
	05-17-2011, 02:21 PM  
		
	 
 
	
		Roenlond 
			Senior Member0  
	
		
			
RE: extra_english now is working, but I need help with a different script :) 
 
				First:
The syntax in parentheses is wrong. Since the command is "AddEntityCollideCallback", the script functions page 
http://wiki.frictionalgames.com/hpl2/amn..._functions  says that you should use:
 void MyFunc(string &in asParent, string &in asChild, int alState)
the code should work besides that, as long as the callback is inside a function (void OnStart in most cases). Syntax errors are one of the nastiest; they don't give any errors but the function won't work anyhow.
{
Second map:
Spoiler below!  
 
 
Forgot a quote around the monster name in two areas.
			
				
(This post was last modified: 05-17-2011, 03:56 PM by Roenlond .) 
 
				
			 
		 
 
 
	05-17-2011, 03:55 PM  
		
	 
 
	
		RawkBandMan 
			Posting Freak5  
	
		
			
RE: extra_english now is working, but I need help with a different script :) 
 
				 (05-17-2011, 03:55 PM) Roenlond Wrote:  http://wiki.frictionalgames.com/hpl2/amn..._functions  says that you should use:{
Spoiler below!  
 
 
Forgot a quote around the monster name in two areas.
Ah I was so close in the credits function! xD Alright I'll try this.
			
 
			
			
I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets. 
			
		 
 
 
	05-17-2011, 11:50 PM  
		
	 
 
	
		RawkBandMan 
			Posting Freak5  
	
		
			
RE: extra_english now is working, but I need help with a different script :) 
 
				Nope. Got a different script and all its giving me is the same error, except with this.
main (8,1) : ERR : Unexpected '{'
HPS
Spoiler below!  
void onStart()
 
 
Thats like 56 lines of script. My other one had 68. Im confused.
			
I've come to learn to not fear the living, nor the dead... But the monsters that hide in closets. 
			
		 
 
 
	05-18-2011, 02:42 AM  
		
	 
 
	
		Roenlond 
			Senior Member0  
	
		
			
RE: extra_english now is working, but I need help with a different script :) 
 
				void OnStart(), not void onStart()
			
			
			
			
		 
 
 
	05-18-2011, 01:17 PM