Author |
Message |
Joesycop
Joined: Mon Oct 19, 2009 9:04 am Posts: 302 Location: Under Your Bed
|
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 |
|
|
Gotcha!
Joined: Tue Apr 01, 2008 4:49 pm Posts: 1972 Location: The Netherlands
|
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 |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
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 |
|
|
Joesycop
Joined: Mon Oct 19, 2009 9:04 am Posts: 302 Location: Under Your Bed
|
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 |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
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 |
|
|
Joesycop
Joined: Mon Oct 19, 2009 9:04 am Posts: 302 Location: Under Your Bed
|
Re: Could someone make the...Homing?
I edited my post. Its in FD guns
|
Thu Aug 19, 2010 11:01 am |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
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.
|
Thu Aug 19, 2010 11:36 am |
|
|
Joesycop
Joined: Mon Oct 19, 2009 9:04 am Posts: 302 Location: Under Your Bed
|
Re: Could someone make the...Homing?
Thanks. Its fun to use
|
Thu Aug 19, 2010 12:07 pm |
|
|
411570N3
Joined: Wed Jan 07, 2009 10:26 am Posts: 4074 Location: That quaint little British colony down south
|
Re: Could someone make the...Homing?
Not a problem. Glad you're having fun.
|
Thu Aug 19, 2010 1:03 pm |
|
|
Joesycop
Joined: Mon Oct 19, 2009 9:04 am Posts: 302 Location: Under Your Bed
|
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 Kinda.
|
Thu Aug 19, 2010 5:28 pm |
|
|
Kyred
Joined: Sun May 31, 2009 1:04 am Posts: 308
|
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 |
|
|
Joesycop
Joined: Mon Oct 19, 2009 9:04 am Posts: 302 Location: Under Your Bed
|
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 |
|
|
Kyred
Joined: Sun May 31, 2009 1:04 am Posts: 308
|
Re: Could someone make the...Homing?
Sorry, that was meant to prevent the missiles from flying back at you. I should have mentioned that
|
Sat Aug 21, 2010 9:34 am |
|
|
|