Grenades (Solved)

Hi,

I’ve recently been working on a gun that has a grenade launcher as its secondary fire, and it suddenly occurred to me:

How (if it’s possible) do you make a grenade like damage effect?

If it is possible does anyone know how to do this?, cause i am clueless… :o

Yes it’s possible.

There are many different ways to go about it.

My Forum ears are open!

:smiley:

Heh, are you trying to boost your post count or something?

Zoup>

3 near sensors (set to react to the grenade object) on the object which is supposed to take on damage. Determine the damage endured by which sensors are active at the time of the explosion.

If by “damage effect” you’re referring to the spherical explosion that takes place after a grenade is detonated then I can help you there, but if you’re talking about “damage effect” as in it causes things around it to be damaged (fragmented walls, broken windows, etc) then there’s very little I can say.

For the explosion:

  1. On a separate non-visible layer, add an icosphere and UV map a fire texture to it. Make sure “Add” is enabled in the Edit Buttons while you’re in Face Select mode (F Key), and use “Copy Drawmode” to duplicate the settings for each face.
  2. Make sure you’re on Frame 1, and insert (i Key) a “scale” key and a “rot” key.
  3. Move to frame 100, scale the sphere so that it’s larger than before, and rotate it by 180 degrees. Now insert the "scale and “rot” keys again.
  4. Press Alt+A to preview the animation, You can adjust the speed of the animation using the NLA editor to fit your needs.
  5. Use the IPO Actuator on the sphere so that the animation plays.
  6. Use the Edit Object Actuator to remove the grenade and add a sphere once the explosion goes off.

The only problem you will encounter now is getting the sphere to fade away in realtime. Blendenzo explained this in a post a while back, but I lost the link to it. I’ll see if I can dig it up.

Thanks for the feedback,

Social: Sorry but i don’t really get what you’re trying to say, still i think you’re on the right lines for what i want to achieve :yes:

Ven0mSevenX: Thanks for that but what i mean is kind of what you said you wouldn’t be able to hepl me with, but as in NPCs take damage not surrounding objects, although i might give that a try…:eyebrowlift2: But thanks anyway i might use that method for making the grenades explosion in the end :stuck_out_tongue:

Use the near sensors to determine how close the grenade is. Have three levels of distance, being checked by three near sensors. Then according to which near sensors are active during explosion, decrease the objects “health” property.

Ah I get it now, thanks thats exactly what i wanted to know :smiley:

If you want something like a burn mark on the wall where it lands then you can download the FPS template (sorry I don’t have a link) and look at the bullet hole script, the same sort of principles should apply.

Replace the non-damaged objects with damaged objects, maybe after a short video runs?

Or replace with damaged objects then do the damage, which would show in front of the damage? Then when the blast was done you would see the new damaged object.

Some place on my computer I have a tut, might be for ogre, or ? on how to simulate this. But its been forever since I have looked at it.

I like the games of non-explosion more. LOL. Well except for lightning.

Hi peeples,

Smelz: I didn’t really think about burns or anything to be honest, but that sounds like a good idea…:rolleyes: oh yeah and i’ve got the FPS Template already thanks :smiley: and just today was trying to get my gun to work in it, got a long way to go though…:frowning:

ititrx: I guess i could do that, but that would involve alot of extra modelling, and i’'m not sure but could it slow down the game at all? :confused:

P.s. I’ve been testing out my own way of making a grenade health damage effect but its not going to well :frowning: still i’ll keep working at it! :yes:

There you go :wink: http://www.box.net/shared/x9lkec7a7q

Woah! :eek:

Thats a nice demo thanks. Hooray for vertex colouring!

Thank ,Zoel, he showed me how to do that XD

Thought i’d update another of my posts to say that i’ve solved it! :smiley:

I ended up using the technique used in James XVI’s, although its taken me up until now to get it to work properly in the FPS Template.

Thanks again to everyone who replied and especially to James XVI, oh yeah, and Zoel! :cool: