I've read a lot about peoples issues with animations, and how there was no concrete tutorial for how to use one. It took me a lot of code reading to finally figure out how to use animations, but once you've figured it out, It can be a breeze. P.S: This is not the method IW uses. It is less concise then their's, but it works the same.
EG: C:Program FilesActivisionCall of Duty 4 - Modern WarfareplayersprofilesUser Inside that folder find the files called mpdata and configmp. Mpdata contains all the xp and kills, headshots etc. Configmp contains all your keybinds and the names of your custom classes.
- Ok first off, make a new map. Once you've loaded it up, save at as whatever you like. Now, make a large block, then use the hollow tool to hollow that block into a room. Hollow tool is located on the command bar right under the 'brush' menu. It looks like a box with a smaller segmented box inside it.
- bM203 - The thing near the end of your gun:/b If you're reading this tutorial I'm assuming you're new to COD4, In this case, have a play around with the M203. If you're like me, you'll use it once and then never again, but It can come in handy. It is fantastic to use in Crossfire and Strike for clearing windows and buildings.
- Turns off shell ejection. Not having to render them should send a few more fps your way, a good addition to your CoD4 config. Clpacketdup 1 Duplicates packets send between player and server - players with a good connection and no packet loss should use 0, players with packet loss should use a higher number (0-5) most players use 1-2 smenable 0.
- Just unzip file 'cod4player.exe', but rather don't put it into the COD4 folder. Then simply run it. Controls:. In main screen click on the keybord to show info about controls. You can set association demos in Setup menu and then just click on demofile to playback.
- Kick player Kicks a player. Use 'all' to kick all players. Killserver Kills the server. Localservers Lists local servers. Map Sets the map to. Maprestart Restarts the map. Maprotate Rotates to the next map in the rotation. Meminfo Lists game memory information. Netdumpprofile Dumps network profile info.
- Once you have your room, (which should be rather large), you should make some worldspawn settings for light.
- Now, right click the 2D grid, then go to 'info' then click 'player_start' to create where the player will spawn in the world. Now place it in the room. Make sure it is not inside a block or you will not spawn. Now right click on the 2D grid agin, go down to 'node', then click 'scripted_node'. A white box will appear in the map. This is where the animation will play from. Place it in the room, a few units off the ground. Click 'E' on the node to enter the entity editor. Name the node like this:
- Now its time to get an actor to perform this animation.Right click the 2D grid, click 'actor', go to 'ally',( If the actor is an enemy he will shoot you) then choose any actor you want. For this example, I will use a marine with an m16. Again, place this actor in the room, near the anim node. Place a few pathnodes if the actor is farther away from the scripted node. Press E when you have the actor selected. Now name him:
- Now its time for scripting. Save your map as test. exit radiant. Now go to your CoD4 folder, go to raw/maps. Create two text documents. Name the first one 'test'. Name the second one 'test_anim'. Open up 'test', click save as, now do this:
Make sure that the .gsc is being saved into the maps folder.
Now go the test_anim file, and do the same thing:
Again, make sure that it is being saved into your maps folder. Now open up test.gsc. Put this code into it:
- Now save the file, and open up test_anim.gsc. Once thats open, place this code into it:
Now ill explain this line to you guys. Basically, this line is calling this anim to be used. 'guy' is the guy who will perform the anim, and 'anim' is the alias we have given the actual anim; combatwalk_f_spin.
Go back to your gsc and put this code in:
Explanation:
This combination will allow you to play any generic human animation you want. To find all the animations in the game find, the xanim folder, located in raw. Go to the raw/maps folder and look through other map's _anim file, like blackout_anim, or scoutsniper_anim, to find out the names of other anims the devs used.
Now we have to wrap up some things. Go to compile tools, compile BSP, reflections, then fast file. Then go to your zone file and add this stuff to the right hand column.
Now click save, build your fast file, and open up CoD4 SP. press the tilde key ~ , then type in: map test.
Now watch your animation play!
Most errors will be due to problems with naming of entities. Also, don't forget your semicolons at the end of each line.
Any issues with this tutorial send me a pm on my profile.
Special thanks to Babycop, as their inclusion of source files in their SP maps have been of invaluable assistance.
By Ediblemittens
Sources: Modsonline.com
--CoDEmanX 02:32, 29 July 2009 (UTC)
cg_drawfps 1
cg_drawfps 1
diplays fps in top right corner
cg_drawlagometer 1
draw your Lagometer on screen
How To Use Cod4 Player Command
com_maxfps 125(One of the most important commands in cod4 is the FPS command, and Ill tell you why. You probably already know that more fps makes the game feel much smoother. What you might not know is that COD4 is based on the q3 engine and is designed to work at 125 FPS.What this means for you is that your going to have problems interacting with the game under 125 FPS. This can mean any thing from not being able to climb objects, or even bad hit detection during fire fights. The problem is your fps is set to 85 by default, lets fix it. Bring down you console and type com_maxfps 125. If you want to remove the limit, type com_maxfps 0.
cg_fov 80
Next up is the field of view command. FOV(field of view) is basically how much you can see on your monitor at one time. The higher the number the more you can see, which will give you a huge advantage over those who don't use this command. Default is 65 max is 80, to change it bring down your console and type 'cg_fov 80'.
r_drawdecals 1
Another helpful command is 'r_drawdecals', set it to 1 for on and 0 for off. Its off by default, and don't be surprised if you turn it on then have to turn it off to get into certain servers. It basically cleans up some of the random paper and trash on the ground, and gives you an fps boost. But some servers want you to have bad fps and wont let you in unless its set to 0(note that the other commands will work fine on any server).
maxpackets 100
Maxpackets next, this command command usually helps people who have good fps but bad hit registration. Default is 30 if your fps is set to 125 you should set maxpackets to this '/maxpackets 100'.
snaps 30
This command tells your cod4 server how many times to update positions of players, bullets ect per second. Default its 20 setting it to '/snaps 30' should make movement look smother and hits register better.
r_drawsun 0
Disables the sun and a bunch of effects that is causes saving you a few fps.
cg_brass 0
Turns off shell ejection. Not having to render them should send a few more fps your way, a good addition to your CoD4 config.
cl_packetdup 1
Duplicates packets send between player and server - players with a good connection and no packet loss should use 0, players with packet loss should use a higher number (0-5) most players use 1-2
sm_enable 0
Turns off unique Shadows ingame, it boosts FPS more than most commands
r_multigpu 1
can add more FPS
r_cachemodellighting 1
can add more FPS
r_cacheSmodellighting 1
can add more FPS
r_aaAlpha 0
remove the anti-aliasing / smudge effects, this can free up more FPS also
How To Use Cod4 Player Command
r_texfiltermipmode 2Turns it to bilinear filtering, which should give you the best fps
r_rendererPreference 0
to use Shader Model 2.0 instead of 3.0 which will increase fps for those people using old videocards
Now Type...
/vid_restart
You're done... enjoy! ;)
To give you some advantage on COD4... here's a compilation of COD4 glitch, click HERE.
If you're one of the few person looking for the quotes displayed on COD4 everytime your character dies in campaign mode, click HERE for the list.