View unanswered posts | View active topics It is currently Fri Dec 27, 2024 10:53 pm



Reply to topic  [ 29 posts ]  Go to page Previous  1, 2
 Craft (un)Invincibility 
Author Message
User avatar

Joined: Sun Aug 09, 2009 9:26 am
Posts: 1633
Reply with quote
Post Re: Craft (un)Invincibility
Grif 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
Profile
User avatar

Joined: Fri Dec 22, 2006 4:20 am
Posts: 4772
Location: Good news everyone!
Reply with quote
Post Re: Craft (un)Invincibility
Raycasting downwards?


Tue Sep 01, 2009 5:56 pm
Profile WWW
User avatar

Joined: Mon Jun 30, 2008 9:13 pm
Posts: 499
Location: Finland
Reply with quote
Post Re: Craft (un)Invincibility
Code:
if self:MoveOutOfTerrain(false) then
  self.GibThis()
end
This may or may not work, the Lua Documents are rather unclear.


Tue Sep 01, 2009 6:28 pm
Profile
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Craft (un)Invincibility
That 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
Profile WWW
User avatar

Joined: Fri Mar 13, 2009 2:31 am
Posts: 217
Location: Earth... I think
Reply with quote
Post Re: Craft (un)Invincibility
ok I'll try it I'm not 100% sure I can but I'll try :)


Sat Sep 05, 2009 2:46 am
Profile
User avatar

Joined: Fri Dec 22, 2006 4:20 am
Posts: 4772
Location: Good news everyone!
Reply with quote
Post Re: Craft (un)Invincibility
What if it gibs when the velocity reaches 0?


Sat Sep 05, 2009 3:23 am
Profile WWW
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Craft (un)Invincibility
...Why would it do that?


Sat Sep 05, 2009 3:39 am
Profile WWW
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Craft (un)Invincibility
i think he meant it as a suggestion.
that could work, too.


Sat Sep 05, 2009 4:02 am
Profile WWW
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Craft (un)Invincibility
Oh, 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
Profile WWW
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Craft (un)Invincibility
self.Vel.Magnitude < 1 ? or maybe < 4 with a timer on detonation.


Sat Sep 05, 2009 11:10 am
Profile WWW
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Craft (un)Invincibility
What 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
Profile WWW
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Craft (un)Invincibility
isnt it a drop-pod? Oo;;
if not, then hell yes raycasting is best.


Sun Sep 06, 2009 2:10 am
Profile WWW
User avatar

Joined: Fri Dec 22, 2006 4:20 am
Posts: 4772
Location: Good news everyone!
Reply with quote
Post Re: Craft (un)Invincibility
I assumed it was a rocket, possibly a droppod.


Mon Sep 07, 2009 4:44 am
Profile WWW
User avatar

Joined: Fri Mar 13, 2009 2:31 am
Posts: 217
Location: Earth... I think
Reply with quote
Post Re: Craft (un)Invincibility
Ok... 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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 29 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.019s | 14 Queries | GZIP : Off ]