Home   Help Search Login Register  

Author Topic: Smoke Effect  (Read 763 times)

0 Members and 1 Guest are viewing this topic.

StonedSoldier

  • Guest
Smoke Effect
« on: 18 Jan 2004, 01:37:03 »
in my mission i have a truck and basically its gunna be destroyed, but when it is i want it to produce black smoke indefinatly, instead of for a few seconds

thankx

Offline icarus_uk

  • Members
  • *
  • LiarLiarPants Inflame True
    • [furryclan]
Re:Smoke Effect
« Reply #1 on: 18 Jan 2004, 02:06:19 »
I'm going to have to assume that you have the resistance addon, as there isnt another way to do it otherwise.  What you need is to use the drop particle array to create black clouds that come out of your truck.

As the forums doesnt like long arrays that span multiple lines (as found out in another thread),   I have a fire script posted at my website;

http://www.ickysworld.com/flashpoint/fire.sqs

If you dont want the fire, then remove the two lines starting; drop ["cl_fire" leaving the last  drop ["cl_basic" line.

You might want to make the numbers larger as well.  Note these sizes arent X, Y and Z.  They are the sizes of particles at the start, part way through, and end of their lives.

If you want the script to last longer you can increase the value in the line ;

?_time >=1000:goto "exit"

I would strongly suggest you leave that exit condition in there, as having a particle script run forever will slowly eat up your memory untill the game crashes.  

Offline Captain Crunch

  • Members
  • *
Re:Smoke Effect
« Reply #2 on: 18 Jan 2004, 06:46:33 »
Or you can download this one add on, and use this very simple script.

The addon link:


http://ofp.gamezone.cz/index.php?sekce=unofaddons/misc&archiv=true&page=7

(Scroll down the page, you'll find it under the name of "SmokeCan - 100 color smokes".

Install the addon in your OFP/Addons folder.

Then copy my script in Your mission folder:


;Smoke.sqs

;This script is used to add smoke if an object is damaged.
;------Type in the "Init" field of the object(s):
;[This] Exec "Smoke.sqs"
;________________________________________________


;This creates a variable passed from the objects.
_Object = _This Select 0
;________________________________________________


;This is a label.
#Loop

;This checks if an object gets damaged. If there's
;no damage, the script reader is sent back to the
;"#Loop" label. If there is any damage, the script reader
;will read further down.
? ((GetDamage _Object) == 0) : GoTo "Loop"
;________________________________________________


;This creates a lit black smoke shell positioned on the destroyed object.
BangS = "SCBlack" CamCreate GetPos _Object
;________________________________________________


;Bye!
Exit
Back to the forest!

Offline MachoMan

  • Honoured
  • Former Staff
  • ****
  • KISS, Keep it Simple Stupid
Re:Smoke Effect
« Reply #3 on: 18 Jan 2004, 19:35:20 »
Or you can download this one add on, and use this very simple script.

The addon link:


http://ofp.gamezone.cz/index.php?sekce=unofaddons/misc&archiv=true&page=7

(Scroll down the page, you'll find it under the name of "SmokeCan - 100 color smokes".

Install the addon in your OFP/Addons folder.

Then copy my script in Your mission folder:


;Smoke.sqs

;This script is used to add smoke if an object is damaged.
;------Type in the "Init" field of the object(s):
;[This] Exec "Smoke.sqs"
;________________________________________________


;This creates a variable passed from the objects.
_Object = _This Select 0
;________________________________________________


;This is a label.
#Loop

;This checks if an object gets damaged. If there's
;no damage, the script reader is sent back to the
;"#Loop" label. If there is any damage, the script reader
;will read further down.
? ((GetDamage _Object) == 0) : GoTo "Loop"
;________________________________________________


;This creates a lit black smoke shell positioned on the destroyed object.
BangS = "SCBlack" CamCreate GetPos _Object
;________________________________________________


;Bye!
Exit
If u use multiple scripts and don't like low fps, this probably isn't a good sollution, snice u continously loop, wich eats cpu power for breakfast.  ;)
Get those missions out there you morons!

Offline Captain Crunch

  • Members
  • *
Re:Smoke Effect
« Reply #4 on: 18 Jan 2004, 22:19:19 »
Hmmm. Thats right. damn!
 

 :-[
Back to the forest!

Offline icarus_uk

  • Members
  • *
  • LiarLiarPants Inflame True
    • [furryclan]
Re:Smoke Effect
« Reply #5 on: 18 Jan 2004, 22:25:49 »
Well if you want smoke you are going to eat CPU cycles anyway.  In order to create particles you are going to use alot of both RAM, videoRAM and CPU cycles, there is no way around it.

I would suggest against the above solution because it A) Uses an addon when you shouldnt need to.  Thus limiting the number of people who will play it.  And B) loops a script when it doesnt need to, an @ command would work just as well.

Offline Captain Crunch

  • Members
  • *
Re:Smoke Effect
« Reply #6 on: 20 Jan 2004, 02:46:03 »
Hey! That sounds like a great idea!  8)

I had never thought about it! How stupid of me!  :-\

It works much better. (Well just the fact to know that my weak little CPU doesn't have so much to do!!)

Code: [Select]
@ GetDammage _Object != 0
Back to the forest!