Call of Duty 5: World at War => Downloadable Items for Mappers => Custom Maps, Mods & Tools => Scripts => Topic started by: Scobalula on May 25, 2016, 08:14:09 am
Title: [Script] LSAT Ammo Counter (+ Usable for other weapons)
Post by: Scobalula on May 25, 2016, 08:14:09 am
This uses a hefty bit of FX, prepare yourself for sp00ki FX error m80.
This will play FX based on how much ammo you have on the weapon. Make sure to download first from the bottom of this post. I have also included some info (probably not the best explained) on using another weapon, maybe from Titanfall, etc. as some of them have on weapon displays.
I have included the following:
Script
Rig
FX
It's pretty nice to have, and if you want you can modify this for many other things, including using it with other weapons.
Adding the Scripts Make sure to copy the stuff from the IWD to the respective folders, root\mods\modname\clienscripts folder should go into your mods folder, and make sure to tick it. Ignore the rig folder for now.
First off, open your mapname.csc in root\mods\modname\clientscripts, if it's not there, copy it from root\raw\clientscripts.
Add this below the telsa line:
In the same csc, mapname.csc, and mapname.gsc, there is a function called preCacheMyFX(), add these in there:
Make sure to tick the CSC in Launcher. :)
Setting Up/Exporting the model. Black Ops 2 probably has the engine handle this, so we need joints to play the fx on.
To make this easier, I have included a rig. You NEED to export the model, this is only a rig, I can't release the model.
Pull on the Maya file I included in the rig folder.
Pull on Tom's Bind file from the one you exported
Export etc. as normal. :P
I won't be answered Maya questions, sorry. :(
Adding to CSV. Add the following to any of your CSVs:
And that should be it. :) Let me know if you run into any issues with the FX or script. :) If I forgot to include something let me know, I probably did, lol.
For using with your own weapon read the README.h, open in program like Notepad++ for easier reading, I am not good at writing up tutorials like that so it's possibly not explained well, if you need assistance with it contact me.
Title: Re: [Script] LSAT Ammo Counter
Post by: Scobalula on May 28, 2016, 03:03:19 pm
I will be releasing an update today once I write up documentation that will allow people to include their own weapons, along with info on how to do it, set up tags, etc.
Here's an example of the LSAT and RE-45 at the same time with no issues.
(https://i.gyazo.com/f02510703723b794678377b8f423cfe7.gif) Double Post Merge: May 28, 2016, 06:54:11 pmUpdated.
Title: Re: [Script] LSAT Ammo Counter (+ Usable for other weapons)
Post by: alaurenc9 on June 04, 2016, 01:43:09 pm
So I made my own version of this and it was very problematic, because I could not figure out how to get the timing correct, and the fx would double or flash and all this other shit, anyways I copied your gdt for my materials because that's the only thing different about yours and mine, because those setting somehow make the new fx replace the last fx or how does that even work? Anyways I copied it into my gdt and it looks pretty good now, except for one thing. The new fx played in the loop does replace the last number when it changes, but my fx are constantly like, doubled. And there is nothing different between my gdt or fx settings from yours. Have any idea what is wrong?
And yes, I'll credit you -_-
Title: Re: [Script] LSAT Ammo Counter (+ Usable for other weapons)
Post by: BluntStuffy on June 04, 2016, 01:56:27 pm
So I made my own version of this and it was very problematic, because I could not figure out how to get the timing correct, and the fx would double or flash and all this other shit, anyways I copied your gdt for my materials because that's the only thing different about yours and mine, because those setting somehow make the new fx replace the last fx or how does that even work? Anyways I copied it into my gdt and it looks pretty good now, except for one thing. The new fx played in the loop does replace the last number when it changes, but my fx are constantly like, doubled. And there is nothing different between my gdt or fx settings from yours. Have any idea what is wrong?
And yes, I'll credit you -_-
Like i told you in pm before, it's all about the timing. You're fx-life time is prob too long ( causing two fx' to show up, and it looking laggy when you move around quickly ) I use 15m miliseconds, so 0.015 as life-time in fx-ed. And loop the fx with a realwait(0.01). It's not to do with the materials, its just the timing..
Title: Re: [Script] LSAT Ammo Counter (+ Usable for other weapons)
Post by: HitmanVere on June 04, 2016, 04:55:58 pm
So I made my own version of this and it was very problematic, because I could not figure out how to get the timing correct, and the fx would double or flash and all this other shit, anyways I copied your gdt for my materials because that's the only thing different about yours and mine, because those setting somehow make the new fx replace the last fx or how does that even work? Anyways I copied it into my gdt and it looks pretty good now, except for one thing. The new fx played in the loop does replace the last number when it changes, but my fx are constantly like, doubled. And there is nothing different between my gdt or fx settings from yours. Have any idea what is wrong?
And yes, I'll credit you -_-
I helped Scoba with FX, since he had issue of it flickering. Turned out he had set FX count 0 to 1. Maybe you have added random value as well, so it shows doubled, for example, 1 to 1?
Title: Re: [Script] LSAT Ammo Counter (+ Usable for other weapons)
Post by: alaurenc9 on June 04, 2016, 05:25:15 pm
Like i told you in pm before, it's all about the timing. You're fx-life time is prob too long ( causing two fx' to show up, and it looking laggy when you move around quickly ) I use 15m miliseconds, so 0.015 as life-time in fx-ed. And loop the fx with a realwait(0.01). It's not to do with the materials, its just the timing..
Yes I have tried this but RealWait is too imperfect due to the fact that it waits as many frames as it can before the amount of time elapsed is over the amount of time you entered into it, and with small amounts of times, it is really hard for it to be accurate.
I helped Scoba with FX, since he had issue of it flickering. Turned out he had set FX count 0 to 1. Maybe you have added random value as well, so it shows doubled, for example, 1 to 1?
No mine is just 1. After copying the material settings though, the fx did improve in terms of how it works. Before it would show like, lets say a digit changed from 3 to 2, it would show the 3 over the 2, as the 2 fx was finishing up. Now after changing the material stuff, it actually cancels the 2 but some how the fx is still doubling. Let me look into it a bit more.
OK so I put realWait to 0.01 and the fx time to 15 again, and this time it actually looks solid most likely because of the material type changes. I'm pretty sure they made the difference. But yeah now it looks pretty solid, so thank you all for the help.
Title: Re: [Script] LSAT Ammo Counter (+ Usable for other weapons)
Post by: nikfar1 on July 16, 2016, 06:07:04 pm
hi all I export lsat from maya to cod,but when I get this weapon, the game is crashed and jumped out and this massage appear: ERROR: dobj for xmodel ..causing the 128 bones exceeded can anyone help me?
Title: Re: [Script] LSAT Ammo Counter (+ Usable for other weapons)
Post by: Scobalula on July 16, 2016, 06:37:37 pm
hi all I export lsat from maya to cod,but when I get this weapon, the game is crashed and jumped out and this massage appear: ERROR: dobj for xmodel ..causing the 128 bones exceeded can anyone help me?
Sounds like your character model has a lot of bones, I am using Player Models from Town (Suit and Hazmat) and haven't had this issue but I remember reading that the weapon model (viewmodel) + player model count towards this 128 Limit, what character models are you using?
EDIT: mean viewhands, not character model, lmao.
Title: Re: [Script] LSAT Ammo Counter (+ Usable for other weapons)
Post by: nikfar1 on July 16, 2016, 07:04:24 pm
Sounds like your character model has a lot of bones, I am using Player Models from Town (Suit and Hazmat) and haven't had this issue but I remember reading that the weapon model (viewmodel) + player model count towards this 128 Limit, what character models are you using?
EDIT: mean viewhands, not character model, lmao.
thanks for replying I am using default character( char_polonsky)
Title: Re: [Script] LSAT Ammo Counter (+ Usable for other weapons)
Post by: Scobalula on July 16, 2016, 08:16:12 pm
my viewhands in game is default but in maya is viewmodel_usa_hazmat_arms I rigged my model in maya that you said I tried to delete some of joint of gun that not important and it worked but I have not good anim in reloading maya:
my viewhands in game is default but in maya is viewmodel_usa_hazmat_arms I rigged my model in maya that you said I tried to delete some of joint of gun that not important and it worked but I have not good anim in reloading maya: