Data Realms Fan Forums
http://45.55.195.193/

Script: Stop homing missiles from going after doors.[Solved]
http://45.55.195.193/viewtopic.php?f=75&t=25559
Page 1 of 1

Author:  Gotcha! [ Sun Sep 18, 2011 11:56 am ]
Post subject:  Script: Stop homing missiles from going after doors.[Solved]

Greetings,

I hope someone can help with the following;
I am using this script for any homing missiles in unitec and wonder if someone could make changes to it to stop the missiles from going after doors. :)

Attachment:
Missile.txt [2.45 KiB]
Downloaded 173 times


Also, if it could be modified in a way to even stop missiles from 'looking through the ground' to find targets (thus only going after enemies it can actually reach) I'd be even more thankful. But I'd be extremely happy already with doors being left alone. :grin:

Author:  Roast Veg [ Sun Sep 18, 2011 12:24 pm ]
Post subject:  Re: Stop homing missiles from going after doors.

Line 15:
Code:
if dist < curdist and actor.ClassName ~= ADoor then


Line 38:
Code:
if dist < curdist and actor.Team ~= self.Team and actor.ClassName ~= ADoor then


If I had ore time, I'd construct a ray sent at the relative vector of the actor from the missile between the dist/ADoor checks and the self.Parent definition, but I don't.

Author:  Gotcha! [ Sun Sep 18, 2011 12:56 pm ]
Post subject:  Re: Stop homing missiles from going after doors.

I've no idea what you said in your last sentence, but thanks, you've helped me greatly. :)

Edit: It still goes after doors. :???:

Author:  CaveCricket48 [ Sun Sep 18, 2011 2:18 pm ]
Post subject:  Re: Script: Stop homing missiles from going after doors.

That should be
Code:
if dist < curdist and actor.ClassName ~= "ADoor" then

and
Code:
if dist < curdist and actor.Team ~= self.Team and actor.ClassName ~= "ADoor" then

Author:  Gotcha! [ Sun Sep 18, 2011 2:34 pm ]
Post subject:  Re: Script: Stop homing missiles from going after doors.

Ah, thank you. :grin:

Author:  Roast Veg [ Sun Sep 18, 2011 11:13 pm ]
Post subject:  Re: Script: Stop homing missiles from going after doors.[Solved]

Damnit, well done Cave.

Page 1 of 1 All times are UTC [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/