Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds
Watch MODSonair

Members Online

»
0 Active | 60 Guests
Online:

LATEST FORUM THREADS

»
New BF2 Mod
BF2 General

Tutorials

»
Adding FX to your SP, CO-OP, or Zombie map
Versions: You must be logged in to view history.

4mori_rabbit shows us how add FX to our Single Player, CO-OP or Zobmie maps. Thank you 4mori_rabbit for your time and work!

- Creating FX gsc
After the scriping part of the creation process of our map we created the FX gsc.
Wich was this basic one located in raw/maps :

Levelname_fx.gsc

Code:


Description of the FX file:
The main function

Code:

the precacheFx() function

Code:


-Adding FX
We need to edit the main file,adding our personal FX.
In this example we will add the fog cloud FX wich is used in the zombie maps.
The name of the FX is "fx_fog_rolling_thick_600x600",If you execute the effects editor you can load it from raw/FX/env/smoke/fx_fog_rolling_thick_600x600.

So our basic code will change to this:


Code:


Changes to our FX main file function:

Code:

We added the info required for the spawn FX wich is "mapscreatefxlevelname_fx::main();" this is our new file where we will input the FX data.
Also added the lines that will make us add our precache data.
Changes to the precacheFX:

Code:


Spawn FX file:
We know need to create a new gsc file wich will have the spawn data of our FX.
The new levelname_fx.gsc file needs to be in raw/maps/createFX.


Code:

ent = maps_utility::createOneshotEffect( "fog_thick" );
This calls what FX you want to play. (the name has been specified in the precache of the main file)

ent.v[ "origin" ] = ( 180, -95, 16 );
Where the FX will be located in X, Y, Z coordinates.

ent.v[ "angles" ] = ( 0, 0, 0 );
This is how the FX will be oriented by rotating the X, Y, Z.

ent.v[ "fxid" ] = "fog_thick";
The name of the FX should be the same as the first line. (we have set this in precache in the main FX file)

ent.v[ "delay" ] = -15;
This is the repeat rate.

Adding files to the zone file.
Open the map zone file levelmap.csv located in /zone_source/ and add all the FX scripts.


Code:


Call of Duty World at War introduces new concepts to the game and the editor.
One of these is in the FX,these have been improved to server and clientscripts.
The previous part of the tutorial covers the server part, we now need to setup the clients so they actually see FX spawns in map.
This is mandatory for single player,co-op or zombie co-op maps.

Clientscripts FX scripts (csc):
Create a basic Levelmap.csc and add it to raw/clientscripts/

Levelname.csc


Code:


The main files makes a call for another piece of the puzzle.
We need to create our clientscript FX file, so create a new csc and call it levelname_FX.csc this also goes in raw/clientscripts

Levelname_FX.csc


Code:


Finally we will make the last script file wich is the spawn file for the FX clientside.
Create a new Levelname_FX.csc and save it in raw/clientscripts/createFX/

Levelname_FX.csc


Code:


Adding the clientscripts to the zone file:

Once again open Levelname.csv (the zone file) and add the clientscripts to it.

Code:


compile and run your map to see the FX in action.

By Rabbit.

Full wiki link (easy viewable) codmapping.com

hope that helps [thumbs_up]

Ps:feel free to copy source from my wiki to anyones for easy sharing and viewing.

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»