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
Printable View
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
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.
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...
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.
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