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.