Joined: Thu May 05, 2011 1:30 am Posts: 2876 Location: Rent free in your head. Vacation in your ass.
Re: Mehman's Experimental Weaponry[V25: new weapon]
HeadcrabPL wrote:
Hi Mehman I want to edit tkc grip but i dont know how soo i have 3 questions: 1.How to make posible to grap drop ships and rockets 2.How to make it smaleer HP drain 3.How to make longer range
Hi HeadCrab. I just thought I should take the time to preform some grammatical fixes and an answer. *How do I *Possible *Grab *How do I *Smaller *How do I
Dude. P is no where near b. Also, go into the .ini of the TKC, if I remember correctly there should be something around there called power, MM should be able to provide a better answer.
Mon May 28, 2012 5:28 pm
HeadcrabPL
Joined: Mon May 23, 2011 3:41 pm Posts: 269
Re: Mehman's Experimental Weaponry[V25: new weapon]
Mackerel wrote:
HeadcrabPL wrote:
Hi Mehman I want to edit tkc grip but i dont know how soo i have 3 questions: 1.How to make posible to grap drop ships and rockets 2.How to make it smaleer HP drain 3.How to make longer range
Hi HeadCrab. I just thought I should take the time to preform some grammatical fixes and an answer. *How do I *Possible *Grab *How do I *Smaller *How do I
Dude. P is no where near b. Also, go into the .ini of the TKC, if I remember correctly there should be something around there called power, MM should be able to provide a better answer.
Ok,thx for telling me good version of my post but its not that easy as you think its there is 4 .ini and lua files so i still need Mehman help Edit1: forget about rockets tell me how to fix it to possible grab ACdropships
Tue May 29, 2012 6:29 pm
Mehman
Joined: Tue Nov 17, 2009 7:38 pm Posts: 909 Location: France
Re: Mehman's Experimental Weaponry[V25: new weapon]
HeadcrabPL wrote:
Hi Mehman I want to edit tkc grip but i dont know how soo i have 3 questions: 1.How to make posible to grap drop ships and rockets 2.How to make it smaleer HP drain 3.How to make longer range
1: It already is possible(at least in the newest version), but the force applied is too weak to make such a huge target move, you can modify the force applied by replacing the content of MPW.rte\TKC\TKCND.lua with this(it is a more customizable version of the file):
Code:
function Create(self)
GetMehmanKeys();
self.identificationkey = tostring(math.random(0,999999999)); self.at = false; for actor in MovableMan.Actors do local dist = SceneMan:ShortestDistance(self.Pos, actor.Pos, true); if dist.Magnitude < 50 and self.at == false then self.Pos = actor.Pos; self.Vel = actor.Vel; actor.PresetName = self.identificationkey; self.at = true; end end self.distact = Vector(0,0); self:Activate(); self.Power = 0; self.VelPower = 0; self.VelRate = 0.3; self.MaxVel = 42; self.BasePower = 15; self.Rate = 2.5;
for actor in MovableMan.Actors do local dist = SceneMan:ShortestDistance(self.Pos, actor.Pos, true); if actor.PresetName == self.identificationkey then self.Pos = actor.Pos; self.Vel = actor.Vel;
--Shockwave
if ( actor:IsPlayerControlled() == true and UInputMan:KeyPressed(MehmanKey0) ) then local i = 0; while i < self.BasePower do local a = CreateMOPixel("Blue Blast","MPW.rte"); a:SetWhichMOToNotHit(actor,-1); local rand = math.random(20,25); a.Pos = actor.Pos + Vector(math.random(-10,10)+math.cos(actor:GetAimAngle(true))*rand,-math.random(-10,10)-math.sin(actor:GetAimAngle(true))*rand ); a.Vel = Vector(0,0); MovableMan:AddMO(a); i = i+1; end
end
if ( actor:IsPlayerControlled() == true and UInputMan:KeyHeld(MehmanKey0) ) then self.Power = self.Power + self.Rate; if self.VelPower <= self.MaxVel then self.VelPower = self.VelPower + self.VelRate; end while self.Power >= 1 do local a = CreateMOPixel("Blue Blast","MPW.rte"); a:SetWhichMOToNotHit(actor,-1); local rand = math.random(20,25); a.Pos = actor.Pos + Vector(math.random(-15,15)+math.cos(actor:GetAimAngle(true))*rand,-math.random(-15,15)-math.sin(actor:GetAimAngle(true))*rand ); a.Vel = Vector(0,0); MovableMan:AddMO(a); self.Power = self.Power - 1; end
for particle in MovableMan.Particles do local pt = actor.Pos + Vector(math.cos(actor:GetAimAngle(true))*30,-math.sin(actor:GetAimAngle(true))*30 ); local dist2 = SceneMan:ShortestDistance(pt, particle.Pos, true); if particle.PresetName == "Blue Blast" and dist2.Magnitude <= 100 then local dx = particle.Pos.X-pt.X; local dy = particle.Pos.Y-pt.Y; if dx > 0 then particle.Vel.X = particle.Vel.X - 0.075*math.abs(dx); elseif dx < 0 then particle.Vel.X = particle.Vel.X + 0.075*math.abs(dx); end
if dy > 0 then particle.Vel.Y = particle.Vel.Y - 0.075*math.abs(dy); elseif dy < 0 then particle.Vel.Y = particle.Vel.Y + 0.075*math.abs(dy); end end end
end
if ( actor:IsPlayerControlled() == true and UInputMan:KeyReleased(MehmanKey0) ) then for particle in MovableMan.Particles do local pt = actor.Pos + Vector(math.cos(actor:GetAimAngle(true))*30,-math.sin(actor:GetAimAngle(true))*30 ); local dist2 = SceneMan:ShortestDistance(pt, particle.Pos, true); if particle.PresetName == "Blue Blast" and dist2.Magnitude <= 100 then local rand = math.random(0,40) + self.VelPower; particle.Vel = Vector(math.random(-10,10)+actor.Vel.X+math.cos(actor:GetAimAngle(true))*rand,math.random(-10,10)+actor.Vel.Y-math.sin(actor:GetAimAngle(true))*rand );
local a = CreateMOPixel("Blue Blast 2","MPW.rte"); a:SetWhichMOToNotHit(actor,-1); a.Pos = actor.Pos + Vector(math.cos(actor:GetAimAngle(true))*rand,-math.sin(actor:GetAimAngle(true))*rand ); a.Vel = Vector(0,0); end end self.VelPower = 0; end
--Crush
if ( actor:IsPlayerControlled() == true and UInputMan:KeyPressed(MehmanKey1) ) then
local mo = SceneMan:CastMORay( actor.Pos , Vector(math.cos(actor:GetAimAngle(true)) * self.range , -math.sin(actor:GetAimAngle(true)) * self.range) , actor.ID, 0,true,0); local moo = MovableMan:GetMOFromID(mo); self.type = 0;
if mo ~= 255 then local roo = MovableMan:GetMOFromID(moo.RootID); if roo.ClassName == "AHuman" or roo.ClassName == "ACrab" or roo.ClassName == "Actor" or roo.ClassName == "ACDropship" or roo.ClassName == "ACRocket" then self.actor = roo; self.distact = SceneMan:ShortestDistance(self.actor.Pos, actor.Pos, true); self.type = 0; elseif roo.ClassName == "TDExplosive" or roo.ClassName == "HeldDevice" or roo.ClassName == "HDFirearm" or roo.ClassName == "AEmitter" then self.actor = roo; self.distact = SceneMan:ShortestDistance(self.actor.Pos, actor.Pos, true); self.type = 1; else self.actor = nil; end else self.actor = nil;
end
end if MovableMan:ValidMO(self.actor) then if self.actor.PresetName ~= "Entity" then if self.type == 0 then if ( actor:IsPlayerControlled() == true and UInputMan:KeyHeld(MehmanKey1) and self.actor ~= nil) then
local os = Vector(actor.Pos.X+math.cos(actor:GetAimAngle(true))*self.distact.Magnitude,actor.Pos.Y-math.sin(actor:GetAimAngle(true))*self.distact.Magnitude);
local dx = self.actor.Pos.X-os.X; local dy = self.actor.Pos.Y-os.Y; if dx > 0 then self.actor.Vel.X = self.actor.Vel.X - ((self.force*math.abs(dx))/self.actor.Mass); elseif dx < 0 then self.actor.Vel.X = self.actor.Vel.X + ((self.force*math.abs(dx))/self.actor.Mass); end
if dy > 0 then self.actor.Vel.Y = self.actor.Vel.Y - ((self.force*math.abs(dy))/self.actor.Mass); elseif dy < 0 then self.actor.Vel.Y = self.actor.Vel.Y + ((self.force*math.abs(dy))/self.actor.Mass); end ToActor(self.actor).Health = ToActor(self.actor).Health - (self.CrushDamage/self.actor.Mass); if self.actor.ClassName == "AHuman" then local c = ToActor(self.actor):GetController(); c:SetState(20,true); end
end elseif self.type == 1 then if (UInputMan:KeyHeld(MehmanKey1) and self.actor ~= nil) then
local os = Vector(actor.Pos.X+math.cos(actor:GetAimAngle(true))*self.distact.Magnitude,actor.Pos.Y-math.sin(actor:GetAimAngle(true))*self.distact.Magnitude);
local dx = self.actor.Pos.X-os.X; local dy = self.actor.Pos.Y-os.Y; self.actor.Vel = self.actor.Vel * 0.975; if dx > 0 then self.actor.Vel.X = self.actor.Vel.X - ((self.force*math.abs(dx))/(5*self.actor.Mass)); elseif dx < 0 then self.actor.Vel.X = self.actor.Vel.X + ((self.force*math.abs(dx))/(5*self.actor.Mass)); end
if dy > 0 then self.actor.Vel.Y = self.actor.Vel.Y - ((self.force*math.abs(dy))/(5*self.actor.Mass)); elseif dy < 0 then self.actor.Vel.Y = self.actor.Vel.Y + ((self.force*math.abs(dy))/(5*self.actor.Mass)); end
end
end if (UInputMan:KeyReleased(MehmanKey1) and self.actor ~= nil) then local os = Vector(math.cos(actor:GetAimAngle(true))*self.distact.Magnitude,-math.sin(actor:GetAimAngle(true))*self.distact.Magnitude);
self.actor.Vel = self.actor.Vel + (self.Vel + (os*self.projectionfactor))/self.actor.Mass; end end end
--Shield
if ( actor:IsPlayerControlled() == true and UInputMan:KeyHeld(MehmanKey2) and self.ShieldPower > 0 and self.t:IsPastSimMS(1500) ) then for particle in MovableMan.Particles do local pdist = SceneMan:ShortestDistance(actor.Pos, particle.Pos, true); local pvel = particle.Vel - actor.Vel; if pdist.Magnitude < 60 and (particle.Age > 25 or particle.Vel.Magnitude <= 25) and particle.ClassName == "MOPixel" and particle.PresetName ~= "None" then particle.ToDelete = true; local a = CreateMOPixel(particle.PresetName); a.Vel = actor.Vel - (SceneMan.GlobalAcc*(TimerMan.DeltaTimeMS/1000)); a.Pos = particle.Pos; MovableMan:AddMO(a); end end self.ShieldPower = self.ShieldPower - 1; elseif self.ShieldPower < self.MaxShieldPower then self.ShieldPower = self.ShieldPower + self.ShieldRate; end
if ( actor:IsPlayerControlled() == true and UInputMan:KeyReleased(MehmanKey2) and self.t:IsPastSimMS(1500) ) or (actor:IsPlayerControlled() == true and UInputMan:KeyHeld(MehmanKey2) and self.ShieldPower <= 0 and self.t:IsPastSimMS(1500)) then for particle in MovableMan.Particles do local pdist = SceneMan:ShortestDistance(actor.Pos, particle.Pos, true);
if pdist.Magnitude < 200 then
local rand = math.random(40,125); particle.ToDelete = false; particle:SetWhichMOToNotHit(actor,-1); particle.Vel = Vector(math.random(-10,10)+actor.Vel.X+math.cos(actor:GetAimAngle(true))*rand,math.random(-10,10)+actor.Vel.Y-math.sin(actor:GetAimAngle(true))*rand ); end end self.t:Reset(); end
end end end
function Destroy(self) local re = CreateTDExplosive("Null Device TKC","MPW.rte"); re.Pos = self.Pos; re.Vel = self.Vel; MovableMan:AddMO(re); end
and then adjusting the value of self.force(line 27).
2: modify the value of self.CrushDamage(line 25).
3: modify the value of self.range(line 29) note: 3 requires the file content replacement, 2 doesn't but is compatible with it.
Wed May 30, 2012 1:04 pm
HeadcrabPL
Joined: Mon May 23, 2011 3:41 pm Posts: 269
Re: Mehman's Experimental Weaponry[V25: new weapon]
To fast for thanks 1.this still need work i still cant grab dropships 2.when i grab something its just being dezintegrate Edit:i seted power to 70000
Wed May 30, 2012 5:29 pm
lukxx
Joined: Tue Nov 22, 2011 6:53 pm Posts: 2
Re: Mehman's Experimental Weaponry[V25: new weapon]
ummm... Dear, MehMan could you please update your mod to cc build 27 ? Thanks
Thu Jun 21, 2012 7:41 pm
Masterofworlds22
Joined: Sun Jul 01, 2012 9:57 am Posts: 1 Location: The Milky Way
Re: Mehman's Experimental Weaponry[V25: new weapon]
Can you make the download into a zip? I'm using Mac and I can't extract Rar.
Sun Jul 01, 2012 9:59 am
razman360
Joined: Mon Aug 08, 2011 9:22 pm Posts: 18
Re: Mehman's Experimental Weaponry[V25: new weapon]
Hey mehman if possible please could you update this pack, because, honestly, it's phenomenal and it would be a shame if we could not longer enjoy it. The error I'm getting is: abortion in file: system/contentfile.cpp, line 577 failed to load: dummy.rte/other/storage crate/cratebodyA000
Mon Aug 06, 2012 4:21 pm
eZkiel2517
Joined: Fri Jan 27, 2012 12:29 am Posts: 12
Re: Mehman's Experimental Weaponry[V25: new weapon]
I updated the mod to work with b27, it was just a path error in a few inis.
I just updated this to be compatible with b27(eZkiel2517 only corrected ini errors, but the mod was still almost unuseable due to lua incompatibility). Still some errors might not have been spotted so if you see one please report it to me.
I also created loadouts for the campain. For the time being the infantry actor is a modified coalition heavy, that will be changed in the future, still it has increased mobility(thanks to a more basic and less buggy version of my mobility script) and a weak shield.
Meine Freunde, I have a bug to report. So I switched modes on the Experimental Launcher, equipped EMP rockets, and my missle comes slamming into the dirt. Then it crashes.
Fri Aug 17, 2012 10:05 pm
Mehman
Joined: Tue Nov 17, 2009 7:38 pm Posts: 909 Location: France
Do you mean that the game crashes, or just the missile? If it is just the missile then it is functionning properly: the "change mode" button lets you use bunker buster missiles that go high up, then take up speed as they fall down to pierce concrete and then explode inside buildings.
Also this is a minor update that prevents MEW Soldiers from randomly jumping when using rocket launchers, download it if you have this problem(that is if you downloaded V26): download/file.php?id=39599
Fri Aug 17, 2012 10:42 pm
Hellevator
Joined: Wed Apr 13, 2011 12:38 am Posts: 162 Location: Only The Claw knows...
I haven't been able to reproduce the bug, where you doing anything special while this happened? Did it only happen once or does it crash every time you fire a missile in this mode?
Sat Aug 18, 2012 10:26 am
Mehman
Joined: Tue Nov 17, 2009 7:38 pm Posts: 909 Location: France
Re: Mehman's Experimental Weaponry[V28: AI]
Minor Update: MEW Soldiers are now able to properly use weapons with recoil.
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