View unanswered posts | View active topics It is currently Sat Dec 28, 2024 5:19 pm



Reply to topic  [ 13 posts ] 
 Could someone make the...Homing? 
Author Message
User avatar

Joined: Mon Oct 19, 2009 9:04 am
Posts: 302
Location: Under Your Bed
Reply with quote
Post Could someone make the...Homing?
Could someone make the Sturm from the FD guns mod and make the missiles heat seek, either team please, and make it seek far enough away so that it doesn't instantly turn around and attack you.

Anyone gonna make or even think about making it?


Last edited by Joesycop on Thu Aug 19, 2010 11:27 am, edited 1 time in total.



Wed Aug 18, 2010 1:11 pm
Profile YIM
User avatar

Joined: Tue Apr 01, 2008 4:49 pm
Posts: 1972
Location: The Netherlands
Reply with quote
Post Re: Could someone make the...Homing?
Sturm? What's that? I think you got your mods mixed up.


Wed Aug 18, 2010 5:31 pm
Profile
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: Could someone make the...Homing?
The forum does not find the word Sturm in any post in the Mods & Scenes section of the forum. Please specify which mod it is you are referencing.


Thu Aug 19, 2010 8:35 am
Profile WWW
User avatar

Joined: Mon Oct 19, 2009 9:04 am
Posts: 302
Location: Under Your Bed
Reply with quote
Post Re: Could someone make the...Homing?
In the Unitec mod... In its pack there is a gun called Sturm. Mabey no one has said its name but its in there.

Oh im a retard I had my mind set on a gun in unitec but a name from a different one. Its in FD guns mod.


Thu Aug 19, 2010 10:49 am
Profile YIM
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: Could someone make the...Homing?
The person that made the mod just said they don't know of it. I also just searched all of the Unitec.rte files for sturm and it didn't show anything. I also couldn't find it in the store list.
Are you sure it's in Unitec?


Thu Aug 19, 2010 10:55 am
Profile WWW
User avatar

Joined: Mon Oct 19, 2009 9:04 am
Posts: 302
Location: Under Your Bed
Reply with quote
Post Re: Could someone make the...Homing?
I edited my post. Its in FD guns


Thu Aug 19, 2010 11:01 am
Profile YIM
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: Could someone make the...Homing?
Extract the contents of this file into FD's Guns.rte/Sturm.
Credit for all .ini code bar the ScriptPath line goes to FinDude.
Credit for all the Lua code which I just cut the team finding code out of goes to TLB.


Attachments:
Sturm Mod.rar [1.74 KiB]
Downloaded 164 times
Thu Aug 19, 2010 11:36 am
Profile WWW
User avatar

Joined: Mon Oct 19, 2009 9:04 am
Posts: 302
Location: Under Your Bed
Reply with quote
Post Re: Could someone make the...Homing?
Thanks. Its fun to use :P


Thu Aug 19, 2010 12:07 pm
Profile YIM
User avatar

Joined: Wed Jan 07, 2009 10:26 am
Posts: 4074
Location: That quaint little British colony down south
Reply with quote
Post Re: Could someone make the...Homing?
Not a problem. Glad you're having fun.


Thu Aug 19, 2010 1:03 pm
Profile WWW
User avatar

Joined: Mon Oct 19, 2009 9:04 am
Posts: 302
Location: Under Your Bed
Reply with quote
Post Re: Could someone make the...Homing?
The only thing is that even if they are closer to an enemy than they are to you ,when it turns into homing, half of them still turn around and kick your ***.

That makes it fun though :D
Kinda.


Thu Aug 19, 2010 5:28 pm
Profile YIM
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Re: Could someone make the...Homing?
This should do the trick. Let me know if it works.

Code:
function Create(self)

--The timer that will measure out the missile's events.

    self.LTimer = Timer();
   
    self.owner = nil
   
    for actor in MovableMan.Actors do
       if SceneMan:ShortestDistance(self.Pos,actor.Pos,true).Magnitude < 50 then
          self.owner = actor;
          break;
       end
    end

end



function Update(self)

    if self.LTimer:IsPastSimMS(500) then

   --Get a target.  Go for the closest actor within 500 pixels.

   if MovableMan:IsActor(self.target) == false and self.owner ~= nil then

       local curdist = 500;

       for actor in MovableMan.Actors do

      local avgx = actor.Pos.X - self.Pos.X;

      local avgy = actor.Pos.Y - self.Pos.Y;

      local dist = math.sqrt(avgx ^ 2 + avgy ^ 2);

      if dist < curdist and actor.RootID ~= self.owner.RootID then

          curdist = dist;

          self.target = actor;

      end

       end

   end



   --If the target still exists...

   if MovableMan:IsActor(self.target) then

       --The direction from the center of the missile to the target.

       local targetdir = math.atan2(-(self.target.Pos.Y-self.Pos.Y),(self.target.Pos.X-self.Pos.X));



       --Gradually angle the missile toward its target.

       if targetdir ~= self.RotAngle then

      self.RotAngle = targetdir;

       end



       --Make sure the missile's thruster is firing.

       if self:IsEmitting() == false then

           self:EnableEmission(true);

       end

   else

       --If there's no target, shut off the thrusters.

       if self:IsEmitting() == true then

           self:EnableEmission(false);

       end

   end



   if self.LTimer:IsPastSimMS(5000) then

       --If the missile has run out of time, self destruct!

       self:GibThis();

   end

    end

end


Thu Aug 19, 2010 7:36 pm
Profile
User avatar

Joined: Mon Oct 19, 2009 9:04 am
Posts: 302
Location: Under Your Bed
Reply with quote
Post Re: Could someone make the...Homing?
1. I have no idea what to do with the code, I suck.
2. I already got it homing, 411 or whatever did it.
3. I just needed 3 things.


Fri Aug 20, 2010 5:45 am
Profile YIM
User avatar

Joined: Sun May 31, 2009 1:04 am
Posts: 308
Reply with quote
Post Re: Could someone make the...Homing?
Sorry, that was meant to prevent the missiles from flying back at you. I should have mentioned that :oops:


Sat Aug 21, 2010 9:34 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 13 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.043s | 16 Queries | GZIP : Off ]