| Author | Message | 
        
			| Benpasko 
					Joined: Sun Aug 09, 2009 9:26 am
 Posts: 1633
   |   Re: Craft (un)InvincibilityGrif wrote: Nope, because altitude is the height OFF THE GROUND. If you fly through a tunnel, it's going to report negative (because there's terrain above you) which in that example script would instantly kill you dead.that sounds like a bad time. I would just reccomend using speed, and testing that out.
 
 | 
		
			| Sat Aug 29, 2009 7:22 am | 
					
					   | 
	
	
		|  | 
	
			| CrazyMLC 
					Joined: Fri Dec 22, 2006 4:20 am
 Posts: 4772
 Location: Good news everyone!
   |   Re: Craft (un)InvincibilityRaycasting downwards? 
 
 | 
		
			| Tue Sep 01, 2009 5:56 pm | 
					
					     | 
	
	
		|  | 
	
			| piipu 
					Joined: Mon Jun 30, 2008 9:13 pm
 Posts: 499
 Location: Finland
   |   Re: Craft (un)InvincibilityCode: if self:MoveOutOfTerrain(false) thenself.GibThis()
 end
This may or may not work, the Lua Documents  are rather unclear.
 
 | 
		
			| Tue Sep 01, 2009 6:28 pm | 
					
					   | 
	
	
		|  | 
	
			| TheLastBanana DRL Developer 
					Joined: Wed Dec 13, 2006 5:27 am
 Posts: 3138
 Location: A little south and a lot west of Moscow
   |   Re: Craft (un)InvincibilityThat only returns false if it can't find its way out of the terrain, so no, it won't work.  Your best bet is to raycast using the velocity of the ship as the second argument and see if that's going to hit something. 
 
 | 
		
			| Tue Sep 01, 2009 6:30 pm | 
					
					     | 
	
	
		|  | 
	
			| ZevN47 
					Joined: Fri Mar 13, 2009 2:31 am
 Posts: 217
 Location: Earth... I think
   |   Re: Craft (un)Invincibilityok I'll try it I'm not 100% sure I can but I'll try   
 
 | 
		
			| Sat Sep 05, 2009 2:46 am | 
					
					   | 
	
	
		|  | 
	
			| CrazyMLC 
					Joined: Fri Dec 22, 2006 4:20 am
 Posts: 4772
 Location: Good news everyone!
   |   Re: Craft (un)InvincibilityWhat if it gibs when the velocity reaches 0? 
 
 | 
		
			| Sat Sep 05, 2009 3:23 am | 
					
					     | 
	
	
		|  | 
	
			| TheLastBanana DRL Developer 
					Joined: Wed Dec 13, 2006 5:27 am
 Posts: 3138
 Location: A little south and a lot west of Moscow
   |   Re: Craft (un)Invincibility...Why would it do that? 
 
 | 
		
			| Sat Sep 05, 2009 3:39 am | 
					
					     | 
	
	
		|  | 
	
			| Geti 
					Joined: Sun Jul 13, 2008 9:57 am
 Posts: 4886
 Location: some compy
   |   Re: Craft (un)Invincibilityi think he meant it as a suggestion.that could work, too.
 
 
 | 
		
			| Sat Sep 05, 2009 4:02 am | 
					
					     | 
	
	
		|  | 
	
			| TheLastBanana DRL Developer 
					Joined: Wed Dec 13, 2006 5:27 am
 Posts: 3138
 Location: A little south and a lot west of Moscow
   |   Re: Craft (un)InvincibilityOh, I see what you mean.Well, funny thing, try setting a dropship's velocity to 0 for an extended period of time.  It already does that.  If you land your dropship belly-down on the ground and manage to keep it perfectly still for long enough, it auto-scuttles.  The problem is, getting a velocity of 0 during normal gameplay conditions is difficult.  There will almost undoubtedly be a decimal velocity.
 
 
 | 
		
			| Sat Sep 05, 2009 4:07 am | 
					
					     | 
	
	
		|  | 
	
			| Geti 
					Joined: Sun Jul 13, 2008 9:57 am
 Posts: 4886
 Location: some compy
   |   Re: Craft (un)Invincibilityself.Vel.Magnitude < 1 ? or maybe < 4 with a timer on detonation. 
 
 | 
		
			| Sat Sep 05, 2009 11:10 am | 
					
					     | 
	
	
		|  | 
	
			| TheLastBanana DRL Developer 
					Joined: Wed Dec 13, 2006 5:27 am
 Posts: 3138
 Location: A little south and a lot west of Moscow
   |   Re: Craft (un)InvincibilityWhat if the player doesn't want to be in constant movement in fear of their dropship gibbing at the lightest hint of deceleration?Seriously, raycasting is probably best in this case.
 
 
 | 
		
			| Sun Sep 06, 2009 2:08 am | 
					
					     | 
	
	
		|  | 
	
			| Geti 
					Joined: Sun Jul 13, 2008 9:57 am
 Posts: 4886
 Location: some compy
   |   Re: Craft (un)Invincibilityisnt it a drop-pod? Oo;;if not, then hell yes raycasting is best.
 
 
 | 
		
			| Sun Sep 06, 2009 2:10 am | 
					
					     | 
	
	
		|  | 
	
			| CrazyMLC 
					Joined: Fri Dec 22, 2006 4:20 am
 Posts: 4772
 Location: Good news everyone!
   |   Re: Craft (un)InvincibilityI assumed it was a rocket, possibly a droppod. 
 
 | 
		
			| Mon Sep 07, 2009 4:44 am | 
					
					     | 
	
	
		|  | 
	
			| ZevN47 
					Joined: Fri Mar 13, 2009 2:31 am
 Posts: 217
 Location: Earth... I think
   |   Re: Craft (un)InvincibilityOk... while I was continuing to try and decipher what you guys just wrote my cortex exploded... thanks! but not thanks.
 Also it is a rocket! not a drop pod but I'm giving up on this due to the fact that I'm still learning Lua and after hours of testing and trying I figure Grif was right all along on the fact that I'm just not ready to tackle something this...looking for word... FUDGING... extensive.
 
 
 | 
		
			| Tue Sep 08, 2009 9:59 pm | 
					
					   | 
	
	
		|  | 
	
	
		|  |