OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: kobay on 10 Oct 2005, 10:03:45

Title: Smoke from an object
Post by: kobay on 10 Oct 2005, 10:03:45
Hi all,

there is a script that make smoke from an object, like house or H invisible.

I'd like to use it to have more atmosfere in a mission, like after a combat in a village with house that smoke

thanks

Kobay
Title: Re:Smoke from an object
Post by: bedges on 10 Oct 2005, 12:16:25
if you feel adventurous, check out this tutorial (http://www.ofpec.com/editors/resource_view.php?id=131). it's how all smoke and fire and other stuff is created.



Title: Re:Smoke from an object
Post by: Pilot on 10 Oct 2005, 16:45:19
Ahhh, the drop command.  There is a steep learning curve with the drop command, but once you figure it out it can be fun to script and a real mission atmosphere builder.

Remember one thing about the drop command, though.  The type (eg, "Bilboard", "Space_Object") are case sensitive.  I once spent several days ripping my hair out because the script wouldn't work, then I found out the object type was case sensitive.

-Pilot
Title: Re:Smoke from an object
Post by: macguba on 10 Oct 2005, 17:19:41
Quote
Pilot

Ah, I see congratulations are in order!   Well done.  :thumbsup:
Title: Re:Smoke from an object
Post by: kobay on 10 Oct 2005, 18:10:41
Well thanks everybody,

but i thik for me is too difficult.

I thought there was a simple external script that you can call in a mission.

Thanks any way

Kobay
Title: Re:Smoke from an object
Post by: bedges on 10 Oct 2005, 19:06:25
okay. best thing is a starting point. see attached. create an object, call it 'smoker', and in its init field put

Code: [Select]
[] exec "smoker.sqs"
when you want it to stop, set the global variable stop_smoking to true.

this is for chimney smoke, which is light grey. smoke from explosions is usually black. in the script you will see the variable _color with lots of numbers - sets of four, like this...

Code: [Select]
_color= [[0.5,0.5,0.5,0.3],[0.4,0.4,0.4,1],[0.5,0.5,0.5,0.6],[0.6,0.6,0.6,0.5],[0.7,0.7,0.7,0]]
that is an array containing color arrays, 5 of them. that means in the lifetime of one particle it will morph through all 5 colours. each colour is a set of 4 numbers: red, green, blue and alpha. the colours are self-explanatory. alpha is how transparent it is.

a value of 1 is 100%, a value of 0 is 0%. play with the values and see what colours you get.

as you rightly point out, the drop command is tricksy, and this thread really belongs in the advanced board. having said that, i've given you the script, all you need to do is play with the numbers. not all that advanced ;)
Title: Re:Smoke from an object
Post by: rado1265 on 10 Oct 2005, 22:58:37
Try this.  Call script by  objname exec "smoke.sqs".  The duration is set on 20 minutes.  You can freely modify him of course (as I did).

EDIT: Its author is Babalon, so don't forget to give him credits.
Title: Re:Smoke from an object
Post by: kobay on 11 Oct 2005, 09:14:13
Thanks boys,

now is easy and usable!!! thanks again!

BUT i have another problem....

Why i cant see the smoke?  :-\

I mean....with the old video CRT i see all,
now i changed video with a new one acer lcd (res 1280x1024 - 60hz) flashpoint is set on 800x600 32bit. I've tryed many times and many config of video but i still cant see the smoke

what do you think is????
Title: Re:Smoke from an object
Post by: Platoon Patton on 11 Oct 2005, 23:15:15
Cloudlets enabled?