View unanswered posts | View active topics It is currently Mon Jul 08, 2024 3:26 pm



Reply to topic  [ 6 posts ] 
 Script: Stop homing missiles from going after doors.[Solved] 
Author Message
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post 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 167 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:


Last edited by Gotcha! on Sun Sep 18, 2011 2:35 pm, edited 2 times in total.



Sun Sep 18, 2011 11:56 am
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post 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.


Sun Sep 18, 2011 12:24 pm
Profile
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post 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. :???:


Sun Sep 18, 2011 12:56 pm
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13143
Location: Here
Reply with quote
Post 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


Sun Sep 18, 2011 2:18 pm
Profile
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post Re: Script: Stop homing missiles from going after doors.
Ah, thank you. :grin:


Sun Sep 18, 2011 2:34 pm
Profile
Data Realms Elite
Data Realms Elite
User avatar

Joined: Tue May 25, 2010 8:27 pm
Posts: 4521
Location: Constant motion
Reply with quote
Post Re: Script: Stop homing missiles from going after doors.[Solved]
Damnit, well done Cave.


Sun Sep 18, 2011 11:13 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

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.025s | 14 Queries | GZIP : Off ]