View unanswered posts | View active topics It is currently Sat Dec 28, 2024 3:42 pm



Reply to topic  [ 8 posts ] 
 Shockwave grenade 
Author Message
User avatar

Joined: Thu Jan 05, 2012 8:18 am
Posts: 76
Location: In a Sauna, roasting to death
Reply with quote
Post 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
Profile

Joined: Sat Oct 22, 2011 8:07 pm
Posts: 149
Reply with quote
Post 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
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post 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
Profile
User avatar

Joined: Wed Feb 17, 2010 12:07 am
Posts: 1545
Location: That small peaceful place called Hell.
Reply with quote
Post 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
Profile
User avatar

Joined: Sun Dec 25, 2011 7:23 am
Posts: 269
Reply with quote
Post 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
Profile
User avatar

Joined: Tue Dec 12, 2006 3:10 pm
Posts: 495
Location: Uncertain quantum state
Reply with quote
Post 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
Profile
User avatar

Joined: Sat Nov 03, 2007 9:44 pm
Posts: 1916
Location: Flint Hills
Reply with quote
Post 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
Profile
User avatar

Joined: Tue Dec 12, 2006 3:10 pm
Posts: 495
Location: Uncertain quantum state
Reply with quote
Post 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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.034s | 14 Queries | GZIP : Off ]