Data Realms Fan Forums http://45.55.195.193/ |
|
Could someone make the...Homing? http://45.55.195.193/viewtopic.php?f=75&t=19539 |
Page 1 of 1 |
Author: | Joesycop [ Wed Aug 18, 2010 1:11 pm ] |
Post subject: | 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? |
Author: | Gotcha! [ Wed Aug 18, 2010 5:31 pm ] |
Post subject: | Re: Could someone make the...Homing? |
Sturm? What's that? I think you got your mods mixed up. |
Author: | 411570N3 [ Thu Aug 19, 2010 8:35 am ] |
Post subject: | 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. |
Author: | Joesycop [ Thu Aug 19, 2010 10:49 am ] |
Post subject: | 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. |
Author: | 411570N3 [ Thu Aug 19, 2010 10:55 am ] |
Post subject: | 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? |
Author: | Joesycop [ Thu Aug 19, 2010 11:01 am ] |
Post subject: | Re: Could someone make the...Homing? |
I edited my post. Its in FD guns |
Author: | 411570N3 [ Thu Aug 19, 2010 11:36 am ] | ||
Post subject: | 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.
|
Author: | Joesycop [ Thu Aug 19, 2010 12:07 pm ] |
Post subject: | Re: Could someone make the...Homing? |
Thanks. Its fun to use |
Author: | 411570N3 [ Thu Aug 19, 2010 1:03 pm ] |
Post subject: | Re: Could someone make the...Homing? |
Not a problem. Glad you're having fun. |
Author: | Joesycop [ Thu Aug 19, 2010 5:28 pm ] |
Post subject: | 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. |
Author: | Kyred [ Thu Aug 19, 2010 7:36 pm ] |
Post subject: | 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 |
Author: | Joesycop [ Fri Aug 20, 2010 5:45 am ] |
Post subject: | 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. |
Author: | Kyred [ Sat Aug 21, 2010 9:34 am ] |
Post subject: | Re: Could someone make the...Homing? |
Sorry, that was meant to prevent the missiles from flying back at you. I should have mentioned that |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |