Home   Help Search Login Register  

Author Topic: Smoke/fire problem  (Read 1542 times)

0 Members and 1 Guest are viewing this topic.

Humvee

  • Guest
Smoke/fire problem
« on: 30 May 2006, 13:46:05 »
hi guys,
here's the deal
Im trying to make this wall of smoke appear very fast en big, the problem is that when i make a small script n place the smoke's (john's smoke effects) and i activate it, they all start firing up. BUT the bad thing is that they have to grow, i want them to start full sized.. so is it possible to make em like burn invisibly and then make em appear when i activate the script?
cheers
Humvee

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Smoke/fire problem
« Reply #1 on: 30 May 2006, 13:52:07 »
is the smoke effect made using the drop command? if so the particles can start as big as you like.

copy/paste the script here and we'll take a look.

Humvee

  • Guest
Re: Smoke/fire problem
« Reply #2 on: 30 May 2006, 14:12:05 »
Code: [Select]
class CfgPatches
{
class JOHN_smoke{units[]={smoke};
};

};

class CfgSounds
{
class empty
{
name="empty";
sound[]={"",0.000000,0.000000};
titles[]={};
};


}


class CfgVehicles
{

class All {};
class Static: All {};
class Building: Static {};
class Strategic : Building {};
class Target : Strategic {};
class JOHN_smoke: Target
{
scope=public;
simulation="fire";
sound="fire";
VehicleClass="Objects";
displayName="JOHN_smoke";
model="empty";


class smoke {

      interval=0.040000;
      cloudletDuration=5.000000;
      cloudletAnimPeriod=5.00000;
      cloudletSize=3.00000;
      cloudletAlpha=1.00000;
      cloudletGrowUp=0.400000;
      cloudletFadeIn=0;
      cloudletFadeOut=5.000000;
      cloudletAccY=0.500000;
      cloudletMinYSpeed=0.20000;
      cloudletMaxYSpeed=0.50000;
      cloudletMaxXSpeed=0.50000;
      cloudletShape="cl_basic";
      cl_basic=1;
      cloudletColor[]={0.95,0.95,0.95};
      initT=1000;
      deltaT=-475;

      class Table
  {
      class T1
      {
maxT=0;
color[]={0.95,0.95,0.95};
      };
      class T2
      {
maxT=800;
color[]={0.2,0.2,0.1,0.8};
      };
      class T3
      {
maxT=1000;
color[]={0.2,0.2,0.1,0.8};
      };
  };
      density=1.100000;
      size=4.00000;
      in=0;
      out=0;
      initYSpeed=-0.05000;
      timetolive=10000000038495920.00000;
      }


      class Light
      {
Shape="kouleSvetlo";
color[] = {0.95, 0.95, 0.95, 0.95};
ambient[] = {0.30000, 0.15000, 0.0000, 0.0};
position = "light";
size = 1.7;
brightness = 3.100;
      };

};
};

That's the smoke addon config

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Smoke/fire problem
« Reply #3 on: 30 May 2006, 14:16:21 »
ah right. this is an addon. hmmm, we have an addon board just for this sort of thing...

#moving...

i don't have experience with addons, but looking at the config i suspect cloudletGrowUp=0.400000; has something to do with it. trying changing it to 1.
« Last Edit: 30 May 2006, 14:27:35 by bedges »

Humvee

  • Guest
Re: Smoke/fire problem
« Reply #4 on: 30 May 2006, 14:59:59 »
nop.. doesn't work
what were you on about? with the drop command? can you like create your own smoke with a script? (or is that just by placing smokegrenades?)

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Smoke/fire problem
« Reply #5 on: 30 May 2006, 15:19:01 »
yes indeed. the drop command is what creates smoke and fire effects, and can be scripted. it's pretty advanced stuff, here's a taster:

create a marker on the map called mk_smoke. then cut and paste the following into notepad and save as "smoker.sqs" in the folder with your mission.

Code: [Select]
;smoke script

_x = getmarkerpos "mk_smoke" select 0
_y = getmarkerpos "mk_smoke" select 1
_color= [[0.5,0.5,0.5,0],[0.5,0.5,0.5,0.3],[0.7,0.7,0.7,0.7],[0.8,0.8,0.8,0.6],[0.9,0.9,0.9,0.5],[0.9,0.9,0.9,0.2],[1,1,1,0]]

#loop

_rub = random 0.025

drop ["cl_basic","","Billboard",1.5,10,[_x,_y,0],[0,0,0],0,1.25,1,_rub,[1,1+(random 3),2+(random 3)],_color,[0],0,0,"","",""]

~random 1

goto "loop"

then use [] exec "smoker.sqs" to run it.

Humvee

  • Guest
Re: Smoke/fire problem
« Reply #6 on: 30 May 2006, 15:50:25 »
ok, no problem

now, how do i adjust the size? and also, this one starts slowely to, can't it go faster? or like be at full size from the start?
this one is very good for normal smoke effects going in the air, but can u also adjust the direction in goes in? i mean, let's say i want to keep it close on the ground but make it spread more around, how do i do that?  i hope i make myself clear here as i'm trying to reveal as least possible information about what im trying to creat  :P
« Last Edit: 30 May 2006, 16:00:34 by Humvee »

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Smoke/fire problem
« Reply #7 on: 30 May 2006, 16:06:44 »
>boing< onto another board again ;)

drop commands are pretty tricky to get just so, so you'll have to experiment. however, i'll get you started by showing you the numbers you'll have to tweak.

EDIT

right. the 'bits':

Drop [ShapeName, AnimationName, Type, TimerPeriod, LifeTime, Position, MoveVelocity, RotationVelocity, Weight, Volume, Rubbing, Size, Color, AnimationPhase, RandomDirectionPeriod, RandomDirectionIntensity, OnTimer, BeforeDestroy, Object]

and an ammended script which might be more suited to your purposes...


Code: [Select]
;smoke script

_x = getmarkerpos "mk_smoke" select 0
_y = getmarkerpos "mk_smoke" select 1
_color=[[0.5,0.5,0.5,0],[0.5,0.5,0.5,1],[0.5,0.5,0.5,0.7],[0.5,0.5,0.5,0.6],[0.5,0.5,0.5,0.5],[0.5,0.5,0.5,0.4],[0.5,0.5,0.5,0]]

#loop

;how much does the smoke move
_rub = random 0.001

;how big is the circle of smoke
_rad = 5 + (random 10)
_ang = random 360


drop ["cl_basic","","Billboard",1.5,10,[_x + (_rad*sin(_ang)),_y + (_rad*cos(_ang)),0.5],[random 2,random 2,0],0,1.275,1,_rub,[8],_color,[0],1,0.1,"","",""]

~0.1

goto "loop"


« Last Edit: 30 May 2006, 16:34:05 by bedges »

Humvee

  • Guest
Re: Smoke/fire problem
« Reply #8 on: 30 May 2006, 16:11:05 »
yeah, just tell me what each bit of the "drop" line does, and i'll mess around with it myself
tnx dude ;)

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Smoke/fire problem
« Reply #9 on: 30 May 2006, 16:56:35 »
and as well as the last bit above, you may want to download the attached tutorial by Vektorboson - it's how i learned ;)

[attachment deleted by admin]

Humvee

  • Guest
Re: Smoke/fire problem
« Reply #10 on: 30 May 2006, 17:22:03 »
wow, tnx dude, this will be pretty handy :)