Page 1 of 1

Making fire

Posted: February 20th, 2012, 6:10 pm
by inzerke
Hi guys,

I wanted to make a floor who's on fire and followed the next tutorial:

http://modsonline.com/Tutorials-read-448.html

I've noticed that this isn't 100% working.
Also how to make a whole floor on fire instead of a little barrel?

Still back to the basic question to get that barrel script working.
I used the following part of the script in ther tutorial, notice I edited some small things which i though it would work:

Code: Select all

{             
	level._effect["fire"] = loadfx ("fx/fire/fire_barrel_fragm_a.fx");
        maps\mp\_fx::loopfx("fire", ( X, Y, Z), 3);             
	level._effect["smoke"] = loadfx ("fx/smoke/thin_black_smoke_M.fx");
        maps\mp\_fx::loopfx("smoke", ( X, Y, Z), 3); 
}
Can anybody also explain with what the ( X, Y, Z), 3); does?

Thanks for help already.

Re: Making fire

Posted: February 20th, 2012, 6:42 pm
by Copy-Cat
In my recent experience with working with FX I have found that the wiki tutorial did not work as expected. I made a few changes to the script after loading the map in Dev mode and reading the errors the console gave me.

1. The path of your effect

Code: Select all

("fx/fire/fire_barrel_fragm_a.fx");
in the gsc script at least for it to work for me should read.

Code: Select all

{             
   level._effect["fire"] = loadfx ("fire/fire_barrel_fragm_a");
        maps\mp\_fx::loopfx("fire", ( X, Y, Z), 3);             
   level._effect["smoke"] = loadfx ("smoke/thin_black_smoke_M");
        maps\mp\_fx::loopfx("smoke", ( X, Y, Z), 3); 
}


Notice I changed the path and also I removed the file extension ".fx" for the name of the effect.

The (X, Y, Z ) are the coordinates withing your map that you want the effect. The easiest way for me to find out the coordinates was to create an Info - Null object at the location I want the effect and copy the coordinates from the Entity's origin values, and paste them into my gsc, remembering to add the commas. If you followed the tutorial correctly you now should have a

raw/maps/mp/mp_yourmap_fx.gsc
and a
raw/maps/createfx/mp_yourmap_fx.gsc

for yourmap. In addition you now should have 4 lines added to your mp_yourmap.csv or your zone file as it is called.

Code: Select all

fx,fire/fire_barrel_fragm_a
fx,smoke/thin_black_smoke_M
rawfile,maps/createfx/mp_yourmap_fx.gsc
rawfile,maps/mp/mp_yourmap_fx.gsc
Now if someone could figure out how to add effects without having to include them in our gsc scripts like the 1rst option of the tutorial you were looking at, I think that would be a hella easier.

Re: Making fire

Posted: February 20th, 2012, 7:16 pm
by inzerke
Just to clear things up for other people,
You can use the tutorial with the following script:

Code: Select all

{             
   level._effect["fire"] = loadfx ("fx/fire/fire_barrel_fragm_a.fx");
        maps\mp\_fx::loopfx("fire", ( X, Y, Z), 3);             
   level._effect["smoke"] = loadfx ("fx/smoke/thin_black_smoke_M.fx");
        maps\mp\_fx::loopfx("smoke", ( X, Y, Z), 3);
}
Thanks to Copy-Cat for making that clear to me. :)
It's working now.

EDIT:
how to make a large floor on fire instead of a small barrel?

Re: Making fire

Posted: February 20th, 2012, 7:38 pm
by Copy-Cat
hmmm, I tried like for 4 hours trying to get that script to work.

What exactly did I say that helped you. :D

Please elaborate on what you did so others can do the same.

Re: Making fire

Posted: February 20th, 2012, 7:55 pm
by Buzzard
inzerke wrote:EDIT:
how to make a large floor on fire instead of a small barrel?
As far as I know you only have two options:
1) Spawn a lot of effects side by side (This will probably look not so good and could cause problems when you have lots of effects in your map).
2) Create/Search a new effect which fits better.

I would recommend number 2) to you. If you have no/not that much experience with the effect editor I would suggest this tutorial by Rezil: viewtopic.php?f=19&t=11909

Re: Making fire

Posted: February 20th, 2012, 7:57 pm
by inzerke
Didn't want to create so much effect near each other for :
1) the work with co-ordinates
2) maybe fps drop there?

Lets have a look at the link you gave me,
hope it helps :d

Re: Making fire

Posted: February 20th, 2012, 8:05 pm
by Copy-Cat
Buzzard wrote: I would recommend number 2) to you. If you have no/not that much experience with the effect editor I would suggest this tutorial by Rezil: viewtopic.php?f=19&t=11909
OMG!!!!!

That is an awesome tut!

Kudos

Re: Making fire

Posted: February 21st, 2012, 1:25 am
by Rezil
Thanks for the feedback. I'd be happy to write some more tutorials, but I don't really know what people have trouble with and what exactly hasn't already been covered elsewhere.