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

Thread: Call of Duty 2 Play Animation

  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
    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).

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

    kung foo man (26th September 2015)

  10. #7
    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.

  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
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    You can only precache 256 xmodels, which is also limited by map models AND trigger use_touch. I found this out the hard way when a certain map with 100 trigger use_touch's crashed my mod
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  13. #10
    Private
    Join Date
    Sep 2015
    Posts
    33
    Thanks
    0
    Thanked 21 Times in 13 Posts
    Quote Originally Posted by Tally View Post
    Do you have the original animations converted to COD2? Because there is no point even talking about this if you haven't.
    Yes, I have.

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
  •