
Members Online»
0 Active | 27 Guests
Online:
|
LATEST FORUM THREADS»
by morgawr
Posts: 1 / 1058 Damaged .pk3's
CoD Mapping by lazygit
Posts: 1 / 1620 heli to attack ai
CoD4 SP Mapping by DrBiggzz
Posts: 11 / 824 New Cod UO Rifle Mod.
CoD Mapping by rr016
Posts: 2 / 3947 setting your own ai names
CoD4 SP Mapping by lazygit
Posts: 2 / 2764 couldnt find path to goal
CoD4 SP Mapping |
Polls»
|
Learn how to properly animate entities in the singleplayer game.
Ok first off lets think of an animation we want for example a full body epic animation from the game. I will choose One From the level Pavlov or the sniper level of call of duty.
STEP1: Mapping of course. first we will want to add a basic entity to our level. Well i will do an actor so i will choose a Russian actor give him a targetname of whatever you want it doesnt mattter.
My key value pair was ...
key: targetname
value: pavlov
/////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////
STEP2: Scripting. Now this took me forever to figure out so be patient. The following lines of script below is an example so dont use it.
pavlov = getent("pavlov","targetname");
pavlov.animname = "Dude";
pavlov thread anim_single_solo (pavlov,"fullbody51");
Now you may be thinking WTF? but it makes since. So first off we have called our entity
as seen on the first line. NOW LOOK AT THIS CAREFULLY OR YOU WILL FAIL!!!!
After that we gave him an animation name wich is Dude. Now notice how in the yellow highlighted names are the same this is vital.
Next we see the red highlighted one and this is the animation that he is playing
then we see the green one this is the animation name.
and last but no least the blue line wich is the type of animation he uses
Ok now final example for scripting then we will move on to an actual function.
Our Animation file is seen below. The file is like this. YOURMAPNAME_anim.gsc
level.scr_face["Dude"]["fullbody51"] = (%facial_commissar2_line_51);
level.scrsound["Dude"]["fullbody51"] = ("commissar2_line51");
level.scr_anim["Dude"]["fullbody51"] = (%shipdeck_soldier_attentionidle);
lets review our colors.
GREEN: Animation name
RED: Animation
and thats all that applies to this script file
ok thats explanation but check the actual script files in the .pk3 for animation reference premade.
///////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
Now For The Actual script URA!!!!
so first take your original map script and add a new function.
thread pavlov();
next add this befor the main function so at the very top
#using_animtree("generic_human");
next copy this in
pavlov()
{
pavlov = getent("pavlov","targetname");//finds the entity we created
pavlov.animname = "Dude";//gives him a name to reference in other script
pavlov thread anim_single_solo (pavlov,"fullbody51");//this is telling him to animate
}
We are Not done Yet
add this final function but dont call it in the main function so just past it under pavlov();
anim_single_solo (guy, anime, tag, node, tag_entity)
{
newguy[0] = guy;
maps_anim::anim_single (newguy, anime, tag, node, tag_entity);
}
now final script file create a new one called whatever your mapname is but with _anim on the end. EX: mymap_anim.gsc
within this script file add all of this
#using_animtree("generic_human");
main()
{
thread animation();
}
animation()
{
level.scr_face["Dude"]["fullbody51"] = (%facial_commissar2_line_51);
level.scrsound["Dude"]["fullbody51"] = ("commissar2_line51");
level.scr_anim["Dude"]["fullbody51"] = (%shipdeck_soldier_attentionidle);
}
This will also require sounds wich i will upload a download for womewhere modsonline is wierd
Otherwise he will stand there like a tard and animate with no sound.
Latest Syndicated News»
Comments: 5
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which... Comments: 5
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ... Comments: 5
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead?
... Comments: 5
Codutility.com up and runn...
It seems to me the like the site is completely dead? Comments: 5
Codutility.com up and runn...
Yeeaahhhh.........
|
Latest Downloads»
OHMY Don Quixote
Call of Duty 2: Maps: Multiplayer (5.76Mb) OHMY Neuburg
Call of Duty 2: Maps: Multiplayer (6.84Mb) OHMY Tebessa
Call of Duty 2: Maps: Multiplayer (7.36Mb) OHMY POW Camp
Call of Duty 2: Maps: Multiplayer (2.15Mb) OHMY Valley
Call of Duty 2: Maps: Multiplayer (5.7Mb) |
Partners & Friends»
|
Site Links and Information
|
Partners
|
Friends
|
Copyright © MODSonline LLC
Tresware Content Management System © 2011
Website Designed by LKFX and Developed by Tresware