UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: Rollonmath42 on September 08, 2012, 12:47:54 pm

Title: ADS on CoD4 Guns Not Working...
Post by: Rollonmath42 on September 08, 2012, 12:47:54 pm
So for some reason I can get sniper rifles to work perfect from CoD4 into CoD5 but if I do something other than that, it doesn't let me ADS all the way. It only goes half way. All of the other animations work perfectly fine and I can move around, it's just the ADS animation. Any ideas as to why it isn't working?

Here is an example with the P90, this is before ADS:
(https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi49.tinypic.com%2F311xds1.jpg&hash=933acb08fbbf508e8f15020975b1a9d1d1ab8578)

This is during ADS:
(https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi45.tinypic.com%2F2mi0vav.png&hash=583c2dd7b59afcdf5f189a3f77448e25b8b2bad3)
Title: Re: ADS on CoD4 Guns Not Working...
Post by: knzombiemaster on September 08, 2012, 01:29:16 pm
Hey rollenmath i dont hear something from you for a long time :d how far is your kino and moon or do you still working on it ??? so to you problem do you used the cod 4 weapon data or do you modyvie one from cod 5 ???
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Darkmapper on September 08, 2012, 02:10:56 pm
Use the cod 4 viewsleeves.
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Rollonmath42 on September 08, 2012, 02:11:56 pm
I don't think I'll be making Black Ops maps... I've got a different remake of something else I'm working on instead. I don't understand what you are saying in that last sentence. Proper grammar/English?
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Rollonmath42 on September 08, 2012, 02:12:42 pm
Isn't that viewhands_black_kit? I never saw my character with those hands even though I added the hand model.
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Darkmapper on September 08, 2012, 02:20:05 pm
any cod 4 viewsleeve will work. You define what viewsleeve you want to use in the _loadout.gsc file.
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Rollonmath42 on September 08, 2012, 02:35:36 pm
Hmm, it isn't loading the black hands for the black_kit... It still has the hands of Dempsey.

Here is the section that I changed the hands to the viewhands_black_kit:

   add_weapon( "custom_sako" );
      PrecacheItem( "napalmblob" );
      PrecacheItem( "napalmbloblight" );
      set_switch_weapon( "custom_sako" );

      set_laststand_pistol( "ray_gun" );

      set_player_viewmodel( "viewhands_black_kit");
      set_player_interactive_hands( "viewhands_black_kit");

      level.campaign = "american";
      return;

If it helps that first line is at 451. I included the image for the hands as well but it still does the normal hands.
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Darkmapper on September 08, 2012, 02:40:04 pm
Code Snippet
Plaintext
	else if( GetDvar( "zombiemode" ) == "1" || IsSubStr( level.script, "nazi_zombie_" ) || level.script == "zombie_test_map" ) // CODER_MOD (Austin 5/4/08): zombiemode loadout setup
{
add_weapon( "zombie_colt" );
PrecacheItem( "napalmblob" );
PrecacheItem( "napalmbloblight" );
set_switch_weapon( "zombie_colt" );

set_laststand_pistol( "zombie_colt" );

set_player_viewmodel( "viewhands_black_kit");
set_player_interactive_hands( "viewhands_player_blackkit");

level.campaign = "american";
return;

Line 416, let me know if that works.
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Rollonmath42 on September 08, 2012, 02:55:34 pm
That's weird, lines 93-450 are commented out... and what you just posted is already within those lines :/... I took out the comments things and deleted the part I posted. About to test.
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Rollonmath42 on September 08, 2012, 03:05:04 pm
Nope, still shows Dempsey's arms...
Title: Re: ADS on CoD4 Guns Not Working...
Post by: knzombiemaster on September 08, 2012, 04:55:41 pm
Nope, still shows Dempsey's arms...

ok so far dont know the animations is not the right you must playr it at animadsup and animads down and why stop the remakes of the black ops maps ?? how far they was and can i have the map datas ?? i work on kino at the mom ent and i am going to finish this map in 3 months so far i think
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Earth on September 08, 2012, 08:04:24 pm
You have to include the xmodel, xmodelparts and xmodelsurfs in your mod, and you have to edit the _loadout.gsc where darkmapper said to. If your loadout has lines from 93-450 that are all commented out, may I ask what the hell were you doing when this happened?  :cereal:

also if you don't use the material and textures it will show up as dempsey's hands, they aren't needed.
didn't you tell me you got this all working and that's why you were excited as poop the other day?
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Rollonmath42 on September 08, 2012, 09:10:55 pm
I got excited because sniper rifles work, not anything else. If you include the weapon file in the mod.csv, the compiler does the work for you so you don't have to do anything about moving x files into your mod. I also changed the part darkmapper already said. I'm not sure why but even though they were commented, I change the part I posted to the viewhands_black_kit and it works, for snipers. Even though I included the images for the hands, it still shows Dempsey's hands.
Title: Re: ADS on CoD4 Guns Not Working...
Post by: treminaor on September 08, 2012, 09:27:11 pm
I got excited because sniper rifles work, not anything else. If you include the weapon file in the mod.csv, the compiler does the work for you so you don't have to do anything about moving x files into your mod. I also changed the part darkmapper already said. I'm not sure why but even though they were commented, I change the part I posted to the viewhands_black_kit and it works, for snipers. Even though I included the images for the hands, it still shows Dempsey's hands.
Snipers work because they dont really use ADS anims. It just puts an image on the screen of a scope.
Title: Re: ADS on CoD4 Guns Not Working...
Post by: knzombiemaster on September 08, 2012, 09:43:02 pm
I got excited because sniper rifles work, not anything else. If you include the weapon file in the mod.csv, the compiler does the work for you so you don't have to do anything about moving x files into your mod. I also changed the part darkmapper already said. I'm not sure why but even though they were commented, I change the part I posted to the viewhands_black_kit and it works, for snipers. Even though I included the images for the hands, it still shows Dempsey's hands.

eh you can use tombmx xmodelconverter with this it goes very easy or just search for anything of this you need all stuff or it wont work:D
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Darkmapper on September 08, 2012, 11:03:29 pm
eh you can use tombmx xmodelconverter with this it goes very easy or just search for anything of this you need all stuff or it wont work:D

He got the models already thats not the problem.

Well afaik i only had to change the default viewsleeves in the _loadout.gsc file. Im not aware of any additional steps that are necessary.
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Rollonmath42 on September 09, 2012, 01:43:42 pm
Snipers work because they dont really use ADS anims. It just puts an image on the screen of a scope.

That makes sense...

I took another look in the file I have for the P90 and it had the animation for the Thompson (since I replaced, not a full move over) for ads_up so I changed it to viewmodel_p90_ads_up and down, but in game it had the gun in front of me instead of aiming forward (it was sideways, covering my view)... I changed it back and it's the same problem with ADS.

Edit: Hmm, I read what I just wrote and I just thought I should try using the weapon file for the actual weapon, not the Thompson and see if it works.
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Rollonmath42 on September 09, 2012, 01:59:12 pm
It works now, I just had to use the original file from MW1.  :troll:
Title: Re: ADS on CoD4 Guns Not Working...
Post by: knzombiemaster on September 09, 2012, 03:24:03 pm
It works now, I just had to use the original file from MW1.  :troll:

so your problem was i think that you not place the anims right
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Rollonmath42 on September 09, 2012, 03:26:14 pm
No I had the right animations, its something different in the file that caused it to work, maybe all of those variables between the reload time and the gunmodel.
Title: Re: ADS on CoD4 Guns Not Working...
Post by: hellboy on September 09, 2012, 03:58:39 pm
It works now, I just had to use the original file from MW1.  :troll:

hello, may i ask what original file you used. thanks
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Rollonmath42 on September 09, 2012, 04:17:50 pm
The weapon file used in MW1, so mine was in Call of Duty 4: Modern Warfare\raw\weapons\sp\p90 specifically for the P90.
Title: Re: ADS on CoD4 Guns Not Working...
Post by: knzombiemaster on September 09, 2012, 04:51:20 pm
No I had the right animations, its something different in the file that caused it to work, maybe all of those variables between the reload time and the gunmodel.

eh thats was what i mean :D you used the mw 1 file so the anims are placed right
Title: Re: ADS on CoD4 Guns Not Working...
Post by: KDXDARK on September 09, 2012, 10:33:40 pm
you add all the xanims?  8)
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Yonkers 1v on July 27, 2014, 03:24:16 pm
i had the same ADS problem only if i use veiwhands from MW4 the ADS for the mw4 guns work, BUT the mutliplayer weapons i use get all screwed up and have invisible textures and stuff???
Title: Re: ADS on CoD4 Guns Not Working...
Post by: ProGamerzFTW on July 27, 2014, 08:27:55 pm
Did you change the handModel in the weapon file to viewmodel_hands_no_model (which defaults it to the one set in the loadout file) or viewhands_black_kit, its prob set to dempseys hands in the weapons file.
Title: Re: ADS on CoD4 Guns Not Working...
Post by: CyberMan1011 on July 27, 2014, 09:29:20 pm
i had the same ADS problem only if i use veiwhands from MW4 the ADS for the mw4 guns work, BUT the mutliplayer weapons i use get all screwed up and have invisible textures and stuff???

Modern Warfare 4 already came out? :o

...:troll:
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Yonkers 1v on July 31, 2014, 05:29:58 am
lol you got me there i meant cod 4 mw

Post Merge: July 31, 2014, 05:31:48 am
Did you change the handModel in the weapon file to viewmodel_hands_no_model (which defaults it to the one set in the loadout file) or viewhands_black_kit, its prob set to dempseys hands in the weapons file.

thanks for replying but i decided just not to use The dinner plate and type 100 lmg in my map so i could have ads with the cod4 guns and i did try what you said
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Metroman260 on August 01, 2014, 10:02:10 pm
Hi Rollon, i already done this before. One's you have all the Xanim animation, you will need modify each one Xanim.

For Examlple. viewmodel_p90_first_time_pullout

1. Now, edit this with Notepad++
2. Scroll down, or search this code: weap_p90_first_lift_plr

#This time, you will need a custom soundaliases

3. Know change the Note-track name.
4. Save.
5. Build Mod

///////////////////////////////

That's all.
Title: Re: ADS on CoD4 Guns Not Working...
Post by: ConvictioNDR on August 01, 2014, 10:10:06 pm
Hi Rollon, i already done this before. One's you have all the Xanim animation, you will need modify each one Xanim.

For Examlple. viewmodel_p90_first_time_pullout

1. Now, edit this with Notepad++
2. Scroll down, or search this code: weap_p90_first_lift_plr

#This time, you will need a custom soundaliases


3. Know change the Note-track name.
4. Save.
5. Build Mod

///////////////////////////////

That's all.
Please look at what year this was posted before you reply.
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Metroman260 on August 01, 2014, 11:11:20 pm
i dont care what or when it was posted. i just wanted to help the new users who doesnt know yet.  :D
Title: Re: ADS on CoD4 Guns Not Working...
Post by: Yonkers 1v on September 07, 2014, 03:32:43 am
add this to your mod builder

material,mtl_black_kit_hands
material,mtl_black_kit_sleeves
xmodel,viewhands_black_kit

it worked for me
Title: Re: ADS on CoD4 Guns Not Working...
Post by: DidUknowiPwn on September 07, 2014, 04:22:38 am
add this to your mod builder

material,mtl_black_kit_hands
material,mtl_black_kit_sleeves
xmodel,viewhands_black_kit

it worked for me
Stop reviving dead topics jesus.