Page 1  of 1  
			 [ 8 posts ]  
			 
	
			
	
	
	
        
        
            Author 
            Message 
         
        
			
				Awesomeness
				
				
					Joined:  Sat Jun 19, 2010 5:02 pmPosts:  331Location:  Mekkan
				
				 
			
				
				 Lua script crashes game?
So, I'm modifying the AI Lua so my actor has a little bar over his head.  This is the beginning of the script: (The rest isn't any different)
	
		
	Code: 
--lolwut?
 The bar floats over his head just fine.  However...  After a few seconds the game crashes without error.  What's wrong?
 
		 
		
			Mon Sep 19, 2011 2:32 am 
			
				
					
					
					
				 
    	
		 
	
	
		 
	
			
				CaveCricket48
				
				
					Joined:  Tue Jun 12, 2007 11:52 pmPosts:  13144Location:  Here
				
				 
			
				
				 Re: Lua script crashes game?
You should check if the bar exists before setting its position.
					 
		 
		
			Mon Sep 19, 2011 2:47 am 
			
				
					
					
					
				 
    	
		 
	
	
		 
	
			
				TheLastBanana
				DRL Developer
				
					Joined:  Wed Dec 13, 2006 5:27 amPosts:  3138Location:  A little south and a lot west of Moscow
				
				 
			
				
				 Re: Lua script crashes game?
MOSParticles will automatically delete themselves after not moving for a while, even if they have a long lifetime. To work around this, you can set the MOSParticle's Age to 0 and ToDelete to false every update.
					 
		 
		
			Mon Sep 19, 2011 3:01 am 
			
				
					
					
					
				 
    	
		 
	
	
		 
	
			
				Awesomeness
				
				
					Joined:  Sat Jun 19, 2010 5:02 pmPosts:  331Location:  Mekkan
				
				 
			
				
				 Re: Lua script crashes game?
Worked perfect.  Thanks.
					 
		 
		
			Mon Sep 19, 2011 3:17 am 
			
				
					
					
					
				 
    	
		 
	
	
		 
	
			
				Awesomeness
				
				
					Joined:  Sat Jun 19, 2010 5:02 pmPosts:  331Location:  Mekkan
				
				 
			
				
				 Re: Lua script crashes game?
Um...  The bar that floats above my head settles when I move it through the ground 1/8 of the time D:
This is the start of the lua:
	
		
	Code: 
--lolwut?
 And this is the ini for the bar:
	
		
	Code: 
//Modelled from the heal effect.
 I can't understand what's wrong  
 
		 
		
			Mon Sep 19, 2011 4:11 am 
			
				
					
					
					
				 
    	
		 
	
	
		 
	
			
				Asklar
				Data Realms Elite
				
					Joined:  Fri Jan 07, 2011 8:01 amPosts:  6211Location:  In your office, earning your salary.
				
				 
			
				
				 Re: Lua script crashes game?
And if you use a MOSRotating instead of a MOSParticle?
					 
		 
		
			Mon Sep 19, 2011 6:08 am 
			
				
					
					
					
				 
    	
		 
	
	
		 
	
			
				CaveCricket48
				
				
					Joined:  Tue Jun 12, 2007 11:52 pmPosts:  13144Location:  Here
				
				 
			
				
				 Re: Lua script crashes game?
Make it pinned and ToSettle = false.
					 
		 
		
			Mon Sep 19, 2011 11:36 am 
			
				
					
					
					
				 
    	
		 
	
	
		 
	
			
				Awesomeness
				
				
					Joined:  Sat Jun 19, 2010 5:02 pmPosts:  331Location:  Mekkan
				
				 
			
				
				 Re: Lua script crashes game?
Setting the PinStrength worked perfectly.  Thanks a bunch 
 
		 
		
			Mon Sep 19, 2011 12:12 pm 
			
				
					
					
					
				 
    	
		 
	
	
		 
	
	
		 
	
	
	
	
	
		
			
				 
		
			 Page 1  of 1  
			 [ 8 posts ]  
			 
	
 
	
	
		Who is online  
	
		Users browsing this forum: No registered users
 
	
	You cannot  post new topics in this forumcannot  reply to topics in this forumcannot  edit your posts in this forumcannot  delete your posts in this forumcannot  post attachments in this forum