UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

[User Script] Actual walking

HOT
broken avatar :(
Created 11 years ago
by Deleted User
0 Members and 1 Guest are viewing this topic.
14,223 views
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
Hey guys,
As most of you know, MW2 introduced new walking animations that looked better than in previous CoDs. Fortunately, bits of that code was left in both CoD4 SP and CoD5 SP (doesn't work in MP). My script uses this and adds a new feel to the map.
First seen on my Zombie Island map.
Script (CoD5 SP):
Code Snippet
Plaintext

// Utilities
#include common_scripts\utility;
#include maps\_utility;
#include maps\_zombiemode_utility;
#include maps\_zombiemode_zone_manager;
#include maps\_music;

// DLC3 Utilities
#include maps\dlc3_code;
#include maps\dlc3_teleporter;

main()
{
//// SETTINGS

level.w_enable = true; // if you want that walking enabled, leave it true
level.w_ads_fix = true; // for some people the gun sways too much when ADS, this will fix it
level.w_gun_move_value_fix = true; // this will make all gun movement position values to be 0 (doesn't include sprinting and rotating)
        level.w_better_prone = true; // this will make the camera shake when moving prone, so it looks like the actual prone movement.
level.w_toggle_by_dvar = true; // this will create a dvar named "cg_ray_walking" to make it toggleable through script

// SETTINGS END

if(level.w_toggle_by_dvar == true) SetDvar("cg_ray_walking", 1);

players = GetPlayers();
wait(1);
array_thread(players,::walking_init);
wait(1);
array_thread(players,::walking_watch);
array_thread(players,::event_watch);
array_thread(players,::prone_watch);
}
// DON'T EDIT THE CODE BELOW
walking_init()
{
self.w_current_value = 1;
self.w_value_true = 1;
self SetClientDvar("bg_bobAmplitudeStanding", "0.02 0.007");
if (level.w_gun_move_value_fix == true)
self SetClientDvar("cg_gun_move_minspeed", 100000);
if (level.w_better_prone == true)
{
self SetClientDvar("cg_gun_move_minspeed", 100000);
self SetClientDvar("bg_bobAmplitudeProne","1 0.2");
}
}

prone_watch()
{
for(;;)
{
if(level.w_gun_move_value_fix == true && self GetStance() == "prone")
{
self SetClientDvar("cg_gun_move_minspeed", 0);
}
else if(level.w_gun_move_value_fix == true)
{
self SetClientDvar("cg_gun_move_minspeed", 100000);
}
wait(0.01);
}
}
walking_watch()
{
if(level.w_enable == true && GetDvar("cg_ray_walking") == 1){
for(;;)
{
if(self.w_current_value > self.w_value_true){
self.w_value_true += 0.02;
} else if(self.w_current_value < self.w_value_true){
self.w_value_true -= 0.02;
}
self SetClientDvar("cg_bobWeaponAmplitude", self.w_value_true);
wait(0.01);
}
}
}

// The code below lets you set events where the bobbing amplitude is set to your value

event_watch()
{
for(;;)
{
if(level.w_ads_fix == true && self adsButtonPressed() == true){
self.w_current_value = 0.16;
} else {
self.w_current_value = 1;
}
wait(0.01);
}
}
The code above won't work in CoD4 SP just like this, you need to call the thread on level.player which is NOT an array.
Hope you enjoy.
TODO:
- Sprint fix:
As some people say, it looks weird when sprinting. Currently I don't know how to fix it, so for now multiply your sprint bob amplitude in the weaponfile by 0.16 (eg. when sprinting amplitude is 1 and 1 then the result is 0.16 0.16)
Video:
http://youtu.be/foIL1kHdxUU
broken avatar :(
×
broken avatar :(
Relentless Mapper
Location: al
Date Registered: 21 August 2011
Last active: 2 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
Nuclear
My Groups
More
×
KDXDARK's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Nuclear
Nuclear
DARKLEGION's requested title
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
KDXDARK's Contact & Social Links
Can you upload a video of it?
broken avatar :(
×
broken avatar :(
[UGX] Founder
Location: usBay Area, California
Date Registered: 24 June 2011
Last active: 2 years ago
Posts
5,551
Respect
6,655Add +1
Forum Rank
Immortal
Primary Group
UGX Administrator
My Groups
More
My Contact & Social Links
More
Signature
If Java had true garbage collection, most programs would delete themselves upon execution.
×
treminaor's Groups
UGX Administrator
UGX Team Member
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
Looks like it might be interesting - I also suggest adding a video.

BTW

Code Snippet
Plaintext
if (level.w_gun_move_value_fix == true)

and

Code Snippet
Plaintext
if (level.w_gun_move_value_fix)

will do the same thing. You don't have to write out bool checks, you can just do if(bool) for true checks and if(!bool) for false checks.
broken avatar :(
×
broken avatar :(
Location: gbsomerset
Date Registered: 2 March 2014
Last active: 2 years ago
Posts
169
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Now you see me, Now you don`t
×
FATKIDSLOV3CAK3's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
FATKIDSLOV3CAK3's Contact & Social LinksZombies_dieHypercaineFATKIDSLOV3CAK3Hypercaine
would really like a video of this to see before trying it out :)
broken avatar :(
×
broken avatar :(
Former UGX Lead Asset Creator
Location: ca
Date Registered: 17 August 2012
Last active: 6 years ago
Posts
1,932
Respect
Forum Rank
Zombie Destroyer
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
Personal Quote
Eh?
Signature

(Click to enter portfolio)
×
SajeOne's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
broken avatar :(
×
broken avatar :(
Location: gbsomerset
Date Registered: 2 March 2014
Last active: 2 years ago
Posts
169
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Now you see me, Now you don`t
×
FATKIDSLOV3CAK3's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
FATKIDSLOV3CAK3's Contact & Social LinksZombies_dieHypercaineFATKIDSLOV3CAK3Hypercaine
thanks saje :)
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
CoDWaW: Zombie Island - Weapon Chalk FX + new walking anims
Well, the script I posted above contains an ADS fix, so people dont have to edit weaponfile to decrease bobbing. And the transition between amplitudes is smooth :)
Also the correct vid is coming very soon.

Post Merge: June 19, 2014, 08:25:40 pm
Video:
http://youtu.be/foIL1kHdxUU
broken avatar :(
×
broken avatar :(
Location: scotlandScotland
Date Registered: 19 March 2014
Last active: 5 years ago
Posts
254
Respect
Forum Rank
Mr. Elemental
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
ALM] Developer
Signature
Bloodsport :- RELEASED -:
-WIP- Cabin Unique :- 75% -:

×
TheScotchGuy's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
TheScotchGuy's Contact & Social LinksTheScotchGuyy
where does this get added to?
broken avatar :(
×
broken avatar :(
Location: gbIsle of Man
Date Registered: 17 July 2013
Last active: 5 years ago
Posts
536
Respect
Forum Rank
Zombie Enslaver
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
- It was a clear black night, a clear white moon -
Signature
<3

AnimalLover

Aranda
Aldenrade
Christmas

<3

×
animallover's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
where does this get added to?

i agree.. where?
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 16 March 2014
Last active: 8 years ago
Posts
19
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Programmer :)
×
Suffocating Edge's Contact & Social LinksZasah_CzombieedgeZasah_lewis
Not sure if you know about this glitch...

Spoiler: click to open...

Moving around or into prone, glitches the gun, increasing the height of it (as shown in the picture.)
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
Not sure if you know about this glitch...

Spoiler: click to open...

Moving around or into prone, glitches the gun, increasing the height of it (as shown in the picture.)
Corrupted script. Prone works fine for me.
broken avatar :(
×
broken avatar :(
Location: gb
Date Registered: 16 March 2014
Last active: 8 years ago
Posts
19
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Programmer :)
×
Suffocating Edge's Contact & Social LinksZasah_CzombieedgeZasah_lewis
Yeah my bad. I didn't copy it all for some reason :?
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 10 October 2013
Last active: 1 year ago
Posts
541
Respect
Forum Rank
Zombie Enslaver
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
ProGamerzFTW's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Yeah my bad. I didn't copy it all for some reason :?

Just tested it out, I'm getting the same bug. :s
broken avatar :(
×
broken avatar :(
Location: de
Date Registered: 18 October 2013
Last active: 2 days ago
Posts
652
Respect
Forum Rank
Zombie Enslaver
Primary Group
Donator ♥
My Groups
More
×
InFInIX's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Oil Rig Beta Access
Oil Rig Beta Access
InFInIX's Contact & Social Links
Just tested it out, I'm getting the same bug. :s
me too :(
but overrall a nice script looks very good!

Post Merge: July 09, 2014, 06:34:56 pm
where does this get added to?
in a new .gsc
Last Edit: July 09, 2014, 06:34:56 pm by InFInIX
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
Currently I'm on vacation and left my laptop at home. Here's a temp fix for now
Change level.w_gun_move_value_fix value to false, that should do it, but the guns will change position like they did before.

 
Loading ...