flaming debris

Post your scripting questions / solutions here

Moderator: Moderators

Post Reply
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

flaming debris

Post 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

:)
Image

www.smallsumo.tk

Yeah Truth above Honor Man ;)
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post by jv_map »

Glue or bind a smoke fx to 'em in your script :wink:
Image
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post 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.

:)
Image

www.smallsumo.tk

Yeah Truth above Honor Man ;)
jv_map
Site Admin
Posts: 6521
Joined: Tue Sep 03, 2002 2:53 pm
Location: The Netherlands
Contact:

Post 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:
Image
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post by small_sumo »

Thanks so much mate, I will get back to you when I try it.

:)
Image

www.smallsumo.tk

Yeah Truth above Honor Man ;)
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post 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.

:(
Image

www.smallsumo.tk

Yeah Truth above Honor Man ;)
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

One object

Post 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.
Last edited by tltrude on Thu Oct 09, 2003 5:16 am, edited 3 times in total.
Tom Trude,

Image
User avatar
small_sumo
Lieutenant General
Posts: 953
Joined: Mon Jul 01, 2002 4:17 pm
Contact:

Post 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.
Image

www.smallsumo.tk

Yeah Truth above Honor Man ;)
Post Reply