MODSonline
  Welcome Guest to MODSonline Home | Forums | Register | Login
Main-Menu
Home
Login
Register
Add Download
Add News
Add Tutorial *
Forums

Advertise
Affiliate Store US *
Affiliate Store UK *
Affiliate Store CA *
Angry Letter Generator
Avatar Upload
Calendar of Games
Contact
Downloads
FAQs
Forums
Member List
Member Projects
News
News Grabber *
Policy
Polls
Private Messages
Reviews
Screenshot Gallery
Search
Servers - Game
Store - Shirts *
Subscribe
Topics
Tutorials
Weblinks
Wiki *
Tutorials
CoD Mapping
CoDUO Mapping
CoD2 Mapping
CoD4 Mapping
CoDWW Mapping
CoD FAQs
HL2 Mapping
HL2 FAQs
SOF1 Mapping
Crysis Mapping
Q4 Mapping
Doom 3 Mapping
Doom 3 FAQs
UT2K3 Mapping
SOF2 Mapping
SOF2 FAQs

Lightray Modeling
General Modeling
General Modding
Adobe Photoshop
Common Mapping Errors

Readme.txt Generator
Members-Online
countytins... [Forum]
COLMAC [Forum]
a.mk [Downl]
Eladd [Today]

4 Members and 11 Guests
Chat MODSonline
0 People Now Chatting
MODSOnline TeamSpeak

download TeamSpeak

In-The-News
Monday, Dec. 1st
A message from foyleman
Sunday, Nov. 30th
MODSonair 156 Live
Friday, Nov. 28th
MODSonair Episode 155
Wednesday, Nov. 26th
MODSonair Forum Buttons
Monday, Nov. 24th
Holiday Gift Guide 2008 - PC
Latest Poll
Single or Multiplayer maps for World at War?
Single-Player 30.12%
Multiplayer 61.45%
WHAT!? The tools are out? 8.43%
Read More...
10 comments

Newsletter
Name:
Email:
Newsletter Archives
Your Membership
User Name:
Password:
Register.
In The Forums
Weird texture problem
HL2 Level Design.. Posts: (5) Views: (30) by cz_squishy
FX help
CoD:WW Scripting.. Posts: (8) Views: (121) by ROTCGuy
A message from foyleman
In The News.. Posts: (7) Views: (75) by ROTCGuy
Elevator Help
CoD 2 Level Desi.. Posts: (2) Views: (19) by luke0777
Art of War Central Quake 4 Mods for Dummies
CoDWW Download
Tutorials: CoD Mapping
Mapping and modding for Call of Duty.
Add your tutorial (registered users)

Rating:
Awful Rating Poor Rating Average Rating Good Rating Excellent Rating
Versions: You must be logged in to view history.
Adding FX to Your SP or MP Map
2004-07-04 20:33:53
In this tutorial we are going to add a small fire and some smoke to an area on our map thats already setup for it
Adding FX

So your at the point in your map that you would like to add some FX's to it. In CoD we add this by means of a script rather then entities in our map. Some may view this as a hassle but it really offers some flexibility as this can be added, altered, or removed without doing anything to your map file and/or needs for additional compiles.

In this tutorial we are going to add a small fire and some smoke to an area on our map thats already setup for it. There are many, many FX's that can be found in the pak5.pk3 file. They have the file extension .efx and I like to extract them out of the pak5.pk3 so that I can view the folder location and file names with ease. You can also find scripting features in the _fx.gsc file in the same pk3 file.

Ok, so lets add some fire and smoke to our map. First lets open the map to simply get some reference information for our script file. After we have our map open lets go to the XY Top view and place your mouse over the location we want our FX's to be. You will notice that at the bottom of our CoDR we have X,Y, and Z coordinates of where our mouse is. In this XY Top view we can only get the X and Y location which we will note for later.
user posted image

Then lets go to the XZ Front view so that we can pin down our last coordinate, Z. Again move your mouse to the location and note the value.
user posted image

Lets add to extra entities to our map just to add a real feeling that the fire is there. We are first going to add a light where the fire will be (I will assume by now you are familiar with how to create lights so we wont go into detail on it). Once you get it in location and the size you want it, lets change the color to fit the glow that comes off of a fire. Hightlight the light and hit "K". I am going to use a orange shade.
user posted image

Now lets make a hurt trigger brush so that when you in the fire the player will take on damage. Create a brush the size and location of your fire. Then right click on it in a 2D view and go to Trigger>hurt (There are options to setup variables for a hurt trigger but we will not go into those in this tutorial). Next we want to texture the whole brush with the Common>trigger texture. We can now save the map file and compile it.
user posted image

Last, lets setup the script file that will call the FX's and place them where we want in the map; the X, Y, and Z locations we noted earlier. Either open your current .gsc file or if you dont have one we will make one. If you need to make one simply make a .txt file and name it that same name as your map file.

Now we are ready to add the script information to our .txt, or current .gsc, that will add our FX's. For our fire we are going to add:
CODE
level._effect["fire"] = loadfx ("fx/fire/tinybon.efx");
maps\mp\_fx::loopfx("fire", (555, -435, 315), 0.6);

and for our smoke we are going to add:
CODE
level._effect["smoke"] = loadfx ("fx/smoke/ash_smoke.efx");
maps\mp\_fx::loopfx("smoke", (555, -435, 370), 0.7);

Your final finished script should be in this format:
CODE
main()
{
level._effect["fire"] = loadfx ("fx/fire/tinybon.efx");
maps\mp\_fx::loopfx("fire", (555, -435, 315), 0.6);
level._effect["smoke"] = loadfx ("fx/smoke/ash_smoke.efx");
maps\mp\_fx::loopfx("smoke", (555, -435, 370), 0.7);
maps\mp\_load::main();
}

To best explain what does what I have labled a shot of the script file. Dont forget to rename your .txt file to a .gsc file. You can setup your pc to simply open .gsc files in whatever text editor you want for future editing.
user posted image

Finally, save the .gsc file, place it in the same folder that your bsp file exists, and test it in game.
user posted image

Special thanks to Kalahad for this information.

Tutorial by General Death

All logos and trademarks and information in this site are property of MODSonline LLC © 2008.
The comments are property of their posters.
RSS news feeds for MODSonline can be found News.php.
MODSonline Subscriptions
Partners
CODAddicts - Call of Duty News & Downloads
XoXide
Frag Universe
Battle for Europe COD2
Call of Duty Headquarters
modbase.be
The Firing Box
Ask About
Advertising
Friends
After Life Gaming
CoD 4 Base
Great Gamer
Ask About
Advertising
Link to Us
MODSonair
View in iTunes
Please help us to raise in the ranks of podcasting and subscribe to our itunes feed using the link above.
MODSonair Releases
MODSonair Episode 155
MODSonair Episode 154
MODSonair Episode 153
MODSonair Episode 152
MODSonair Episode 151
Next Show
The next MODSonair show will air LIVE on:

Time remaining:
Copyright © 2008 MODSonline
Tresware Content Management System Copyright © 2008 Tresware
Website Designed and Hosted   Tresware