Author |
Message |
Dex98
Joined: Thu Jan 05, 2012 8:18 am Posts: 76 Location: In a Sauna, roasting to death
|
Shockwave grenade
I know it's possible. How would you make a grenade that explodes into a shockwave that makes enemies/teammates/self fly without ripping them/him/her apart in the progress?
I've tried adding mass and reducing sharpness but the amount of mass i've had to add to make the enemies fly also makes the enemies explode
and also: How do you make invisible MOPixels
|
Sun Mar 04, 2012 6:19 pm |
|
|
The Chairman
Joined: Sat Oct 22, 2011 8:07 pm Posts: 149
|
Re: Shockwave grenade
This is how you do invisible MOPixels: Code: Color = Color R = 255 G = 0 B = 255
|
Sun Mar 04, 2012 10:07 pm |
|
|
Azukki
Joined: Sat Nov 03, 2007 9:44 pm Posts: 1916 Location: Flint Hills
|
Re: Shockwave grenade
The trick to pushing without much splattering is to do it gradually; more push, less impact. You can do this with varying velocities of particles. A 40m/s particle will hit before a 30m/s particle, etc. Another way to do it even more gradually is to make the explosion based upon an emitter, so the particles start traveling outwards toward targets at different times. Using more particles with less mass each will help, up to an extent. Go too far with that and you'll just get more lag, though.
If you want an absolute guarantee of victims not losing body parts, you'll have to use Lua.
|
Sun Mar 04, 2012 11:02 pm |
|
|
Coops
Joined: Wed Feb 17, 2010 12:07 am Posts: 1545 Location: That small peaceful place called Hell.
|
Re: Shockwave grenade
The problem with MO to MO collision still exists though. Having an MOPixel slowly push an actor would be as if it were a nail pushing instead then exploding the limb if it gets too deep into the atom group collision.
But like Azukki brought up, more particles will help to a certain extent.
|
Mon Mar 05, 2012 1:13 am |
|
|
ryry1237
Joined: Sun Dec 25, 2011 7:23 am Posts: 269
|
Re: Shockwave grenade
I think the vanilla Air Blast MOPixel seem to have just the right amount of mass to push actors a good distance away without directly injuring them.
|
Mon Mar 05, 2012 9:58 am |
|
|
findude
Joined: Tue Dec 12, 2006 3:10 pm Posts: 495 Location: Uncertain quantum state
|
Re: Shockwave grenade
Code: function Create(self) local strength = 2000 local radius = 300 local d for actor in MovableMan.Actors do d = SceneMan:ShortestDistance(self.Pos,actor.Pos,true) if d.Magnitude<radius then actor:ApplyForce(d.SetMagnitude(strength/d.Magnitude), Vector(0,0) ) end end Stick it to a particle in the explosion.
|
Fri Mar 09, 2012 6:39 pm |
|
|
Azukki
Joined: Sat Nov 03, 2007 9:44 pm Posts: 1916 Location: Flint Hills
|
Re: Shockwave grenade
Maybe add in something to make the target's size (diameter property gives a numerical estimate) have some effect on the force exerted?
A tiny thing takes less force to move, but its lesser surface area makes it get hit by less force from a concussive blast.
|
Wed Mar 14, 2012 7:19 am |
|
|
findude
Joined: Tue Dec 12, 2006 3:10 pm Posts: 495 Location: Uncertain quantum state
|
Re: Shockwave grenade
Acceleration is proportional to force and inversely proportional to the mass of the object the force is acting upon. Cortex Command already simulates this.
Air resistance is a separate property defined elsewhere.
|
Wed Mar 14, 2012 11:34 am |
|
|
|