Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Call of Duty 2 Play Animation

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private
    Join Date
    Sep 2015
    Posts
    33
    Thanks
    0
    Thanked 21 Times in 13 Posts

    Call of Duty 2 Play Animation

    Hi,

    I am trying to develop the Black Ops Zombie mode on Call of Duty 2 and I would like to know if there is possible to play animation on a script_model by script.
    Thanks for the answer.

    croni1012

  2. #2
    Private First Class php's Avatar
    Join Date
    Nov 2012
    Posts
    142
    Thanks
    28
    Thanked 116 Times in 59 Posts
    Short answer; no

    Other than that yes,

    1) Multiple models and play them using ent setmodel("xmodel/model[1-24]"); where 1-24 is the animation frames in models (it takes up lots of size though the higher the animation frames)
    2) Use a player entity/bot or a clone of a player using player cloneplayer(); and use libcod to set the animation legsAnim/torsoAnim.

  3. The Following User Says Thank You to php For This Useful Post:

    kung foo man (26th September 2015)

  4. #3
    Private
    Join Date
    Sep 2015
    Posts
    33
    Thanks
    0
    Thanked 21 Times in 13 Posts
    Quote Originally Posted by php View Post
    Short answer; no

    Other than that yes,

    1) Multiple models and play them using ent setmodel("xmodel/model[1-24]"); where 1-24 is the animation frames in models (it takes up lots of size though the higher the animation frames)
    2) Use a player entity/bot or a clone of a player using player cloneplayer(); and use libcod to set the animation legsAnim/torsoAnim.
    1) How many model I can add to the mod?
    2) Can I control the bot player?

  5. #4
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by croni1012 View Post
    1) How many model I can add to the mod?
    2) Can I control the bot player?
    You can theoretically precache 1000 xmodels, but you will likely crash the server with the index-model overflow error before you get there, because maps have models in them to start with.

    What type of animations are you trying to run? First-person ones? Or world animations?

    For world animations, you can force an animation on a player or bot by putting the animation in a weapon file, and forcing the weapon on the player/bot. This is how Meatbot and Pezbot make the bots run, climb, throw a grenade, or shoot. This is very advanced stuff, and you are likely to need someone with experience to do it for you.

    For first-person animations, you are pretty much stuck with having to create xanims and put them in a weapon file. Again, you force the weapon on a player/bot, and play the xanim.

  6. The Following User Says Thank You to Tally For This Useful Post:

    kung foo man (26th September 2015)

  7. #5
    Private
    Join Date
    Sep 2015
    Posts
    33
    Thanks
    0
    Thanked 21 Times in 13 Posts
    Quote Originally Posted by Tally View Post
    You can theoretically precache 1000 xmodels, but you will likely crash the server with the index-model overflow error before you get there, because maps have models in them to start with.

    What type of animations are you trying to run? First-person ones? Or world animations?

    For world animations, you can force an animation on a player or bot by putting the animation in a weapon file, and forcing the weapon on the player/bot. This is how Meatbot and Pezbot make the bots run, climb, throw a grenade, or shoot. This is very advanced stuff, and you are likely to need someone with experience to do it for you.

    For first-person animations, you are pretty much stuck with having to create xanims and put them in a weapon file. Again, you force the weapon on a player/bot, and play the xanim.
    World animations. I wrote a mod which like Black Ops Zombie bot mod. The zombies are script models with hitbox, and climb into the house where the players are playing. Unfortunatelly, the zombies moving and attacking are 50-60 xmodels, and the climbing is 30. But it would be lot nicer and detailed if I can play anim on them and not need a lot of xmodel...

  8. #6
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by croni1012 View Post
    World animations. I wrote a mod which like Black Ops Zombie bot mod. The zombies are script models with hitbox, and climb into the house where the players are playing. Unfortunatelly, the zombies moving and attacking are 50-60 xmodels, and the climbing is 30. But it would be lot nicer and detailed if I can play anim on them and not need a lot of xmodel...
    Do you have the original animations converted to COD2? Because there is no point even talking about this if you haven't.

  9. #7
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    One issue your going to run into if you use custom animations;

    If the player joined a previous server before joining yours without relaunching, the playeranim.script file located in the mp folder will not be reloaded. This is bad because for custom animations to load, they need to be added to that file. This isn't fixable even with libcod.

    That being said, you can use libcod to do what your describing. See http://killtube.org/showthread.php?2...etAnim(string)
    You can move bots with moveTo() (stock function) or you can use http://killtube.org/showthread.php?2...t-amp-grenades if you wish to move bots without them clipping through objects.

    If you wish to see a bot server currently using the libcod custom animation method - check out 5.9.90.148:28960/199.233.246.208:28960 (1.0) or 5.9.90.148:28962/199.233.246.208:28962 (1.3).

  10. The Following User Says Thank You to filthy_freak_ For This Useful Post:

    kung foo man (26th September 2015)

  11. #8
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by filthy_freak_ View Post
    One issue your going to run into if you use custom animations;

    If the player joined a previous server before joining yours without relaunching, the playeranim.script file located in the mp folder will not be reloaded. This is bad because for custom animations to load, they need to be added to that file. This isn't fixable even with libcod.

    That being said, you can use libcod to do what your describing. See http://killtube.org/showthread.php?2...etAnim(string)
    You can move bots with moveTo() (stock function) or you can use http://killtube.org/showthread.php?2...t-amp-grenades if you wish to move bots without them clipping through objects.

    If you wish to see a bot server currently using the libcod custom animation method - check out 5.9.90.148:28960/199.233.246.208:28960 (1.0) or 5.9.90.148:28962/199.233.246.208:28962 (1.3).
    Correct me if I am wrong, but the playeranim.script file is a server file. It is not a client file. The server will use the one on the server - not the one in the client's files. So, it doesn't matter where the client has been before he gets to the server, the server will load its files on the player as soon as he connects.

  12. #9
    Private First Class
    Join Date
    Oct 2013
    Posts
    219
    Thanks
    56
    Thanked 105 Times in 66 Posts
    Quote Originally Posted by Tally View Post
    Correct me if I am wrong, but the playeranim.script file is a server file. It is not a client file. The server will use the one on the server - not the one in the client's files. So, it doesn't matter where the client has been before he gets to the server, the server will load its files on the player as soon as he connects.
    The playeranim.script might be loaded, but the client does not parse/cache it on rejoin. When a client connects to a server it caches a list of ALL animations the server uses. Death animations, first person animations, world animations are all stored into a client side array. This doesn't get reset/reloaded when joining another server. I can't think of a better way to explain it. If you want to test, run the meatbot mod, join a regular server, chill for a minute and then join the meatbot server. It will kick you and return an error similar to "Unknown token: bot_stand" due to the anim files not being reloaded.

    I'v spent some effort attempting to fix it, and even found the source of the problem. Problem is the issue is client-side, so cannot be patched using libcod.
    Last edited by filthy_freak_; 27th September 2015 at 08:11.

  13. #10
    Brigadier General
    Join Date
    Oct 2012
    Posts
    994
    Thanks
    20
    Thanked 588 Times in 388 Posts
    Quote Originally Posted by filthy_freak_ View Post
    The playeranim.script might be loaded, but the client does not parse/cache it on rejoin. When a client connects to a server it caches a list of ALL animations the server uses. Death animations, first person animations, world animations are all stored into a client side array. This doesn't get reset/reloaded when joining another server. I can't think of a better way to explain it. If you want to test, run the meatbot mod, join a regular server, chill for a minute and then join the meatbot server. It will kick you and return an error similar to "Unknown token: bot_stand" due to the anim files not being reloaded.

    I'v spent some effort attempting to fix it, and even found the source of the problem. Problem is the issue is client-side, so cannot be patched using libcod.
    I didn't know about that. So, thanks for the info. It never ceases to amaze me that even after 10 years of modding, there is still something to learn.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •