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

Members Online

»
0 Active | 155 Guests
Online:

LATEST FORUM THREADS

»
Mohaa maps on Cod2?
CoD2 MP Mapping
is this place alive?
CoDBO3 Mapping
Call of DutyŽ: WWII
CoD WW2 General

Tutorials

»
CoD Mapping
ratings:
Awful Rating
Poor Rating
Average Rating
Good Rating
Excellent Rating
SP Animation Finally explained
Versions: You must be logged in to view history.

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.

 

 

commissar3 = getent("guy10","targetname");
commissar3.animname = "hangar_soldier1";
trigg6 = getent("trigg6", "targetname");
trigg6 waittill("trigger");
level.nKamarov animscriptsshared::LookAtEntity(level.player, 10, "alert");
commissar3 thread anim_single_solo (commissar3,"fullbody51");

 

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

»
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

»