Page 1 of 1

flaming debris

Posted: Thu Sep 18, 2003 5:04 am
by small_sumo
How can I make flaming debris for my exploder. Well to be more precise I want an exploder chunk that is flaming and smoking. A smoke trail similar to a bazooka shell.

Thanks

:)

Posted: Thu Sep 18, 2003 5:44 am
by jv_map
Glue or bind a smoke fx to 'em in your script :wink:

Posted: Thu Sep 18, 2003 6:22 am
by small_sumo
Ok but all the exploderchunks have the same name, can I get round that somhow? Or should I script them separatly to happen when game win (I only have one bomb). I guess all the chunks could have a flmae on em, can you sugest a good emiter?

Thanks.

:)

Posted: Thu Sep 18, 2003 11:22 am
by jv_map
I think the easiest way is to give your exploderchunks an arbitrary key / value pointing to the fx to use, for example (key - value):

$fire - fx/fire.tik

Then in your script e.g. use this:

Code: Select all

explode local.set:
  for(local.i = 1; local.i <= $exploderchunk.size; local.i++)
  {
    local.chunk = $exploderchunk[local.i]
    if(local.chunk.set == local.set)
    {
      if(local.chunk.fire != NIL)
      {
        local.chunk.fx = spawn local.chunk.fire
        local.chunk.fx glue local.chunk
        local.chunk.fx anim start
        local.chunk.fx thread removeatdeath local.chunk
      }
    }
  }
  exec global/exploder.scr::explode local.set
end

removeatdeath local.dier:
  while(local.dier)
    waitframe

  if(self)
    self remove
end
Oh and fx_firesmoke may be a good fx to use :wink:

Posted: Fri Sep 19, 2003 3:25 am
by small_sumo
Thanks so much mate, I will get back to you when I try it.

:)

Posted: Thu Oct 09, 2003 3:09 am
by small_sumo
Can someoen please help me to implement what jv has said. Sorry but I am not sure how to set it up.

:(

One object

Posted: Thu Oct 09, 2003 3:25 am
by tltrude
With Jv-map's setup, you have to add the following key/value to the exploderchunks you want to burn (to each chunk entity in your map).

Key: $fire
Value: models/emitters/fire.tik // use the model you want

Then you would replace this line in your script:

exec global/exploder.scr::explode 1

with this line:

thread explode 1

Of course, his thread has to be in your script. I tried it and it works great with "models/emitters/fireandsmoke.tik", but the smoke is not dense enough, and the fire was not glued to the center of the chunk at all angles. You need to find the right model for it.

By the way, if you just want all the chunks to flame, you can put this line in prespawn:

local.chunk.fire = "models/emitters/fire.tik" //use whatever model you want

and then you don't have to put the key/value for each chunk in the map.

Posted: Thu Oct 09, 2003 5:05 am
by small_sumo
So I add jv's code and sall it explode 1: to my script change exec global exp to thread explode 1. I will try it.