*Lua Tech Inc.* V2.31- Spike pistol fix!
Author |
Message |
Exalion
Joined: Fri Mar 02, 2007 6:59 am Posts: 1726 Location: NSW, Australia
|
Re: *Lua Tech Inc.* V2.13 - Stealth chip not invincible!
Is there a variable to make the time spent crouching a little shorter? I find I need a lot of combat free areas to use the vehicles properly, so It's virtually impossible in skirmish games.
|
Thu Jun 18, 2009 7:24 am |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
Re: *Lua Tech Inc.* V2.13 - Stealth chip not invincible!
Change this: Code: timekeep:IsPastSimMS(3000) in ShieldUpgrader.lua with the 3000 changed to the time in MS you want. Change this: timekeep:IsPastSimMS(4000) in that same file to the time when the riding window of time ends.
|
Thu Jun 18, 2009 7:32 am |
|
|
Exalion
Joined: Fri Mar 02, 2007 6:59 am Posts: 1726 Location: NSW, Australia
|
Re: *Lua Tech Inc.* V2.13 - Stealth chip not invincible!
cheers bro! will do that now.
|
Thu Jun 18, 2009 9:53 am |
|
|
dracura
Joined: Mon May 12, 2008 8:44 pm Posts: 65
|
Re: *Lua Tech Inc.* V2.13 - Stealth chip not invincible!
Is it possible to (either as a new function or a mod to the stop-field function) make a field that inste4ad of stopping all particles around you, will instead deflect them away from you?
Currently, you can do this with a closely placed gravity spot which will pull bullets off their trajectory toward itself. However, timing it is hard as hell.
|
Thu Jun 18, 2009 2:44 pm |
|
|
numgun
Joined: Sat Jan 13, 2007 11:04 pm Posts: 2932
|
Re: *Lua Tech Inc.* V2.13 - Stealth chip not invincible!
I have a request that is otherwise impossible or very difficult via normal modding: A simple explosive grenade that sends out its gibbed/spawned particles in this perspective: I've been wanting to have an expanding perspective shockwave blast effect like this for ages and with seeing Kyred just made something I thought impossible with the real charge up gun, I thought this might be possible too. So simply put: Make a simple grenade that explodes 200 particles with that perspective like on the picture.
|
Thu Jun 18, 2009 4:49 pm |
|
|
Kyred
Joined: Sun May 31, 2009 1:04 am Posts: 308
|
Re: *Lua Tech Inc.* V2.13 - Stealth chip not invincible!
numgun wrote: I have a request that is otherwise impossible or very difficult via normal modding: A simple explosive grenade that sends out its gibbed/spawned particles in this perspective: I've been wanting to have an expanding perspective shockwave blast effect like this for ages and with seeing Kyred just made something I thought impossible with the real charge up gun, I thought this might be possible too. So simply put: Make a simple grenade that explodes 200 particles with that perspective like on the picture. You mean you want the projectile/grenade to explode and send out 200 projectiles in an expanding circle outward? Or do you want to circle to appear at an angle like in the picture? Scratch that, I got what your asking. I think I know of a way to do it. You'll need to create the projectile's from the center of the blast (or maybe a bit off center to simulate the particles a bit further away). The positions for each will be found using trig applied to ellipses instead of circles. Start from an angle of zero and work around to 2*PI. You can also adjust the trail lengths of the particles closer the foreground to simulate the wave effect. The part with apply trig to a ellipsis would be the toughest part. Creating the equation might require me to break out my Calculus book >_<. Their might be an easier way of doing this, however. This method was just the first one that came to mind when I looked at that picture.
Last edited by Kyred on Thu Jun 18, 2009 5:13 pm, edited 1 time in total.
|
Thu Jun 18, 2009 4:55 pm |
|
|
numgun
Joined: Sat Jan 13, 2007 11:04 pm Posts: 2932
|
Re: *Lua Tech Inc.* V2.13 - Stealth chip not invincible!
I want it to expand in a circle with the angle like in that picture. If you've played worms world party/armageddon, then remember the explosion animation. It had similar effects.
How I would imagine it working is that vertical velocity is greatly reduced for the blast particles. Horizontal velocity would remain much less reduced over time.
|
Thu Jun 18, 2009 5:03 pm |
|
|
Duh102
happy carebear mom
Joined: Tue Mar 04, 2008 1:40 am Posts: 7096 Location: b8bbd5
|
Re: *Lua Tech Inc.* V2.13 - Stealth chip not invincible!
numgun wrote: How I would imagine it working is that vertical velocity is greatly reduced for the blast particles. Horizontal velocity would remain much less reduced over time. Couldn't you just put the following in a .lua file and attach it to your blast particles? Code: function Update(self) self.Vel.Y = self.Vel.Y / 0.999; end
|
Thu Jun 18, 2009 5:09 pm |
|
|
Kyred
Joined: Sun May 31, 2009 1:04 am Posts: 308
|
Re: *Lua Tech Inc.* V2.13 - Stealth chip not invincible!
numgun wrote: I want it to expand in a circle with the angle like in that picture. If you've played worms world party/armageddon, then remember the explosion animation. It had similar effects.
How I would imagine it working is that vertical velocity is greatly reduced for the blast particles. Horizontal velocity would remain much less reduced over time. Lol, I think I like your guy's ideas better than the one I mentioned in my edit a few seconds ago. Sounds like a lot less work.
|
Thu Jun 18, 2009 5:15 pm |
|
|
numgun
Joined: Sat Jan 13, 2007 11:04 pm Posts: 2932
|
Re: *Lua Tech Inc.* V2.13 - Stealth chip not invincible!
The funny thing is I only thought of it now how it might work. Thanks to Duh102 for the ready code too, now I can make a cool supernova explosion I've always wanted... based on particles only!
|
Thu Jun 18, 2009 5:37 pm |
|
|
TheLastBanana
DRL Developer
Joined: Wed Dec 13, 2006 5:27 am Posts: 3138 Location: A little south and a lot west of Moscow
|
Re: *Lua Tech Inc.* V2.13 - Stealth chip not invincible!
Actually, I think that would be self.Vel.Y * 0.999. If you divide it by 0.999 it will increase.
|
Thu Jun 18, 2009 9:13 pm |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
Re: *Lua Tech Inc.* V2.13 - Stealth chip not invincible!
dracura wrote: Is it possible to (either as a new function or a mod to the stop-field function) make a field that inste4ad of stopping all particles around you, will instead deflect them away from you?
Currently, you can do this with a closely placed gravity spot which will pull bullets off their trajectory toward itself. However, timing it is hard as hell. Change this: Code: if HoldingE == 5 then for actor in MovableMan.Particles do if math.sqrt(math.pow((actor.Pos.X-self.Pos.X),2) + math.pow((actor.Pos.Y - self.Pos.Y),2)) < 250 then actor.Vel = Vector(actor.Vel.X * -1, actor.Vel.Y * -1) end end for actor in MovableMan.Actors do if math.sqrt(math.pow((actor.Pos.X-self.Pos.X),2) + math.pow((actor.Pos.Y - self.Pos.Y),2)) < 250 and actor.ID ~= self.ID then actor.Vel = Vector(actor.Vel.X * -1, actor.Vel.Y * -1) end end for actor in MovableMan.Items do if math.sqrt(math.pow((actor.Pos.X-self.Pos.X),2) + math.pow((actor.Pos.Y - self.Pos.Y),2)) < 250 then actor.Vel = Vector(actor.Vel.X * -1, actor.Vel.Y * -1) end end end With this: Code: if HoldingE == 5 then for actor in MovableMan.Particles do if math.sqrt(math.pow((actor.Pos.X-self.Pos.X),2) + math.pow((actor.Pos.Y - self.Pos.Y),2)) < 250 then actor.Vel = Vector(actor.Vel.X * -1, actor.Vel.Y * -1) end end for actor in MovableMan.Actors do if math.sqrt(math.pow((actor.Pos.X-self.Pos.X),2) + math.pow((actor.Pos.Y - self.Pos.Y),2)) < 250 and actor.ID ~= self.ID then actor.Vel = Vector(actor.Vel.X * -1, actor.Vel.Y * -1) end end for actor in MovableMan.Items do if math.sqrt(math.pow((actor.Pos.X-self.Pos.X),2) + math.pow((actor.Pos.Y - self.Pos.Y),2)) < 250 then actor.Vel = Vector(actor.Vel.X * -1, actor.Vel.Y * -1) end end end
|
Thu Jun 18, 2009 10:57 pm |
|
|
Boba_Fett
Joined: Wed Jul 30, 2008 10:27 pm Posts: 272
|
Re: *Lua Tech Inc.* V2.13 - Stealth chip not invincible!
I hate to nag, but could you make a bullet train version that doesn't open the hatches when yuo first buy it? I find my actors plummet to their deaths when I order one.
|
Thu Jun 18, 2009 11:05 pm |
|
|
dracura
Joined: Mon May 12, 2008 8:44 pm Posts: 65
|
Re: *Lua Tech Inc.* V2.13 - Stealth chip not invincible!
Okay, tried it....wow does that backfire badly. It seems to juggle particles and things back and forth every frame, and half the time when you release the key, it'll send things flying at your actor.
I was thinking more of an anti-gravity field of sorts, that instead of drawing particles toward the center, repels them away based on distance to the central point.
|
Fri Jun 19, 2009 1:53 am |
|
|
mail2345
Joined: Tue Nov 06, 2007 6:58 am Posts: 2054
|
Re: *Lua Tech Inc.* V2.13 - Stealth chip not invincible!
Try to change it to this: Code: if HoldingE == 5 then for actor in MovableMan.Actors do local diff = math.sqrt(math.pow((actor.Pos.X-self.Pos.X),2) + math.pow((actor.Pos.Y - self.Pos.Y),2)) if diff < 30 then diff = 30 end if (diff < 100) and actor.PinStrength == 0 and actor.ID ~= self.ID then local diffx = actor.Pos.X - self.Pos.X local diffy = actor.Pos.Y - self.Pos.Y local ang = math.atan2(diffy,diffx) actor.Vel.Y = actor.Vel.Y + (100 / diff * math.sin(ang)) * psyintensity * 2 actor.Vel.X = actor.Vel.X + (100 / diff * math.cos(ang)) * psyintensity * 2 end end
for actor in MovableMan.Particles do local diff = math.sqrt(math.pow((actor.Pos.X-self.Pos.X),2) + math.pow((actor.Pos.Y - self.Pos.Y),2)) if diff < 50 then diff = 50 end if (diff < 100) and actor.PinStrength == 0 then if actor.PresetName == "Psy Bullet" then actor.Lifetime = actor.Lifetime * 1.01 end if not(actor.PresetName == self.PresetName) then local diffx = actor.Pos.X - self.Pos.X local diffy = actor.Pos.Y - self.Pos.Y local ang = math.atan2(diffy,diffx) actor.Vel.Y = (actor.Vel.Y + (120 / diff * math.sin(ang)) * psyintensity) * 2 actor.Vel.X = (actor.Vel.X + (120 / diff * math.cos(ang)) * psyintensity) * 2 end end end for actor in MovableMan.Items do local diff = math.sqrt(math.pow((actor.Pos.X-self.Pos.X),2) + math.pow((actor.Pos.Y - self.Pos.Y),2)) if diff < 30 then diff = 30 end if (diff < 100) and actor.PinStrength == 0 then local diffx = actor.Pos.X - self.Pos.X local diffy = actor.Pos.Y - self.Pos.Y local ang = math.atan2(diffy,diffx) actor.Vel.Y = (actor.Vel.Y + (120 / diff * math.sin(ang)) * psyintensity) * 2 actor.Vel.X = (actor.Vel.X + (120 / diff * math.cos(ang)) * psyintensity) * 2 end end end
|
Fri Jun 19, 2009 2:15 am |
|
|
|
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
|
|