• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help Help with animations
#1
Hey guys, I have noticed on RSE v26 when the bot is currently using the sprint animation their gun doesn't do the animation but floats instead but in this video
the gun does follow the animation it's currently using. Would it be possible to be able to do what @4FunPlayin did in his NPC bodyguard mod and put it into the RSE v26 sprinting animation.

the code for the sprint anim is this:

doBotSprintAnim()
{
self endon("bot_reset");
self endon("death");
self endon("disconnect");
level endon("game_ended");

self.animinprogress = true;
self.sprintaniminprogress = true;

self.BotAnim delete();

self.BotAnim = spawn("script_model", self.origin);
self.BotAnim setModel( self.model );

self.BotAnim LinkTo(self, "tag_origin", (-4, 0, 0), (-4, 0, 0) );

self.BotAnim.headmodel delete();

self.BotAnim.headmodel = spawn( "script_model", self.BotAnim getTagOrigin( "j_spine4" ));
self.BotAnim.headmodel setModel(self.headmodel);
self.BotAnim.headmodel.angles = (270, 0, 270);
self.BotAnim.headmodel linkto( self.BotAnim, "j_spine4" );

if(self.weapontype == 1)
self.BotAnim scriptModelPlayAnim("pb_sprint_pistol");
else
if(self.weapontype == 2)
self.BotAnim scriptModelPlayAnim("pb_sprint_shield");
else
if(self.hasakimbo == 1)
self.BotAnim scriptModelPlayAnim("pb_sprint_akimbo");
else
self.BotAnim scriptModelPlayAnim("pb_sprint");

self HideTestClientParts();

}
  Reply
#2
It means that there's no such tag in animation file for j_gun.
Probably it isn't just "pb_sprint". Maybe "pb_sprint_primary" or whatever. Check animationlist.txt in raw/ in CoD4/BO Mod tools, it has the same ones.
C++/Obj-C developer. Neko engine wip
Steam: Click
  Reply
#3
Probably the animation name is wrong. Also make sure all anims are precached.
  Reply
#4
(10-08-2014, 20:07)Yamato Wrote: Probably the animation name is wrong. Also make sure all anims are precached.

Okay man will try
  Reply
#5
By the way, great work!
C++/Obj-C developer. Neko engine wip
Steam: Click
  Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)