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

New CoD walking V2

broken avatar :(
Created 11 years ago
by Deleted User
0 Members and 1 Guest are viewing this topic.
8,234 views
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
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
//DOESNT WORK FOR NOW // level.w_sprint_fix = true; // for some people it may look weird when sprinting, that will fix it
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 values to be 0 (doesn't include sprinting and rotating)
level.w_better_prone = true; // This will enhance 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);
SetDvar("ray_walking_holster",0);
SetDvar("ray_walking_holster_r",-25);
SetDvar("ray_walking_holster_p",5);
SetDvar("ray_walking_holster_y",20);
players = GetPlayers();
array_thread(players,::walking_init);
array_thread(players,::walking_watch);
array_thread(players,::event_watch);
array_thread(players,::prone_watch);
array_thread(players,::rot_watch);
}

rot_watch()
{
        self endon("disconnect");
for(;;)
{
//iPrintLn(weaponClass(self GetCurrentWeapon()));
roll = self GetVelocity() * anglestoright(self GetPlayerAngles());
x_pos = self GetVelocity() * anglestoForward(self GetPlayerAngles());
z_pos = self GetVelocity() * anglestoUp(self GetPlayerAngles());
pitch = self GetVelocity() * anglestoUp(self GetPlayerAngles());
x_pos = x_pos/200;
z_pos = z_pos/150;
if(weaponClass(self GetCurrentWeapon()) == "mg"){
if(pitch>0)
pitch = pitch/7.5;
else
pitch = pitch/30;
}
else
{
pitch = pitch/15;
}
roll = roll/15;
if(isDefined(self.is_diving) && !self.is_diving)
{
if(GetDvarInt("ray_walking_holster") == 1)
self SetClientDvar("cg_gun_rot_r",roll[0]+roll[1]+roll[2]+GetDvarInt("ray_walking_holster_r"));
else
self SetClientDvar("cg_gun_rot_r",roll[0]+roll[1]+roll[2]);
if(GetDvarInt("ray_walking_holster") == 1)
self SetClientDvar("cg_gun_rot_p",pitch[0]+pitch[1]+pitch[2]+GetDvarInt("ray_walking_holster_p"));
else
self SetClientDvar("cg_gun_rot_p",pitch[0]+pitch[1]+pitch[2]);
self SetClientDvar("cg_gun_move_u",z_pos[0]+z_pos[1]+z_pos[2]);
self SetClientDvar("cg_gun_move_f",x_pos[0]+x_pos[1]+x_pos[2]);
if(GetDvarInt("ray_walking_holster") == 1)
self SetClientDvar("cg_gun_rot_y",GetDvarInt("ray_walking_holster_y"));
else
self SetClientDvar("cg_gun_rot_y",0);
}
wait(0.1);
}
}

walking_init()
{
self.w_current_value = 1; // leave this or everything breaks
self.w_value_true = 1; // leave this or everything breaks
self SetClientDvar("bg_bobAmplitudeStanding", "0.02 0.007");
if (level.w_gun_move_value_fix == true)
self SetClientDvar("cg_gun_move_minspeed", -100000);
self SetClientDvar("cg_gun_rot_minspeed", -100000);
if (level.w_better_prone == true)
{
self SetClientDvar("cg_gun_move_minspeed", -100000);
self SetClientDvar("cg_gun_rot_minspeed", -100000);
self SetClientDvar("bg_bobAmplitudeProne","1 0.1");
}
}

prone_watch()
{
        self endon("disconnect");
for(;;){
if(level.w_gun_move_value_fix == true && self GetStance() == "prone"){
self SetClientDvar("cg_gun_move_minspeed", 0);
self SetClientDvar("cg_gun_rot_minspeed", 0);
} else if(level.w_gun_move_value_fix == true) {
self SetClientDvar("cg_gun_move_minspeed", -100000);
self SetClientDvar("cg_gun_rot_minspeed", -100000);
}
wait(0.1);
}
}

walking_watch()
{
        self endon("disconnect");
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);
}
}
}

event_watch()
{
        self endon("disconnect");
for(;;)
{
if(level.w_ads_fix == true && (self adsButtonPressed() == true || self isSprinting())){
self.w_current_value = 0.16;
} else {
self.w_current_value = 0.5;
}
wait(0.01);
}
}

isSprinting()
{
velocity = self GetVelocity();
originHeight = self.origin[2] - 40;
player_speed = abs(velocity[0]) + abs(velocity[1]);
if(player_speed > 225) return true;
return false;
}

COMPATIBLE WITH UGX Mod 1.1 Dive to prone!
The only thing I require is credit, thanks :)
broken avatar :(
×
broken avatar :(
Location: usIllinois
Date Registered: 1 July 2014
Last active: 9 years ago
Posts
93
Respect
Forum Rank
Rotting Walker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
Maps Completed - Slapshot - Suspended
Signature
×
hardpoint_taken's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
what exactly is this??? 8)
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
Forgot to put the video, sorry for that!
http://youtu.be/HAqgrBveZso
broken avatar :(
×
broken avatar :(
Location: usCalifornia
Date Registered: 28 July 2013
Last active: 6 years ago
Posts
702
Respect
Forum Rank
Zombie Enslaver
Primary Group
Donator ♥
My Groups
More
Personal Quote
Pizza that is all.
Signature
There's no better feeling in the world than a warm pizza box on your lap.
×
SoulTaker's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
SoulTaker's Contact & Social Links
what exactly is this??? 8)
It's a update to this.

http://ugx-mods.com/forum/index.php?topic=3194.0

I'm guessing this fixes a issue that some people had when they loaded another map without the script.
:P
broken avatar :(
×
broken avatar :(
Location: caCanada
Date Registered: 9 May 2014
Last active: 1 month ago
Posts
399
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Signature
×
GTTClan's Groups
It's a update to this.

http://ugx-mods.com/forum/index.php?topic=3194.0

I'm guessing this fixes a issue that some people had when they loaded another map without the script.
:P

Will be applying if this is fixed. ;)

Also, Ray, I'm honestly more interested in the BO2 HUD and the weapons lol XD
broken avatar :(
×
broken avatar :(
Face to Face
Location: chSomwhere
Date Registered: 6 October 2013
Last active: 3 years ago
Posts
947
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
Signature
Maya <3

Let's Play some osu!
×
MrDunlop4's Groups
MrDunlop4's Contact & Social LinksMrDunlop4Nelielexy0Nelielexy0Nelielexy0Nelielexy0CSNelieley
Hi

Thx for sharing, but how can i install it?

- MrDunlop4
Last Edit: December 30, 2014, 12:06:49 pm by MrDunlop4
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 6 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Signature
Donate to me if you enjoy my work. https://www.paypal.me/thezombiekilla6
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
Hi

Thx for sharing, but how can i install it?

- MrDunlop4

Copy an exisiting .gsc, and name it anything you want, for example. ray_walking. Then delete all the contents in that gsc and copy this into it. Then call it the same way you do any other gsc, in your mapname under zombiemode_main put
Code Snippet
Plaintext
maps\name_of_gsc::main();
broken avatar :(
×
broken avatar :(
Face to Face
Location: chSomwhere
Date Registered: 6 October 2013
Last active: 3 years ago
Posts
947
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
MrDunlop4's Groups
MrDunlop4's Contact & Social LinksMrDunlop4Nelielexy0Nelielexy0Nelielexy0Nelielexy0CSNelieley
Copy an exisiting .gsc, and name it anything you want, for example. ray_walking. Then delete all the contents in that gsc and copy this into it. Then call it the same way you do any other gsc, in your mapname under zombiemode_main put
Code Snippet
Plaintext
maps\name_of_gsc::main();

Thx for helps, but it doesnt work yet.

MrDunlop4
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 6 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social Linksdust103194MrZ0mbiesFanaticMrZ0mbiesFanatic
Thx for helps, but it doesnt work yet.

MrDunlop4

What doesnt work? Thats the exact same way I did it
broken avatar :(
×
broken avatar :(
Face to Face
Location: chSomwhere
Date Registered: 6 October 2013
Last active: 3 years ago
Posts
947
Respect
Forum Rank
The Decider
Primary Group
Member
My Contact & Social Links
More
×
MrDunlop4's Groups
MrDunlop4's Contact & Social LinksMrDunlop4Nelielexy0Nelielexy0Nelielexy0Nelielexy0CSNelieley
What doesnt work? Thats the exact same way I did it

Yeah it works now :D . I did everything wrong. Thx for helping dude.

MrDunlop4
broken avatar :(
×
broken avatar :(
Location: trİstanbul
Date Registered: 26 December 2014
Last active: 2 months ago
Posts
126
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Mapper Elite
My Groups
More
My Contact & Social Links
More
×
c.h.n's Groups
Mapper Elite Has shown excellence and experience in the area of custom mapping in the UGX-Mods community.
c.h.n's Contact & Social Linksc_h_ncihan_gurbuzRadiantCHN
i stumbled upon the gameplay video of your map christmas delivery and noticed you figured out how to to control cg_gun_rot_r dvar which i've never been able to control to have better looking walking animations. i downloaded your map and found the file which control this animation and edited it a lot. i took bo1 mp44 as a reference. by the way, you're the reason i signed up on ugx. thanks a lot.

this is how i did it


Code Snippet
Plaintext
#include common_scripts\utility; 
#include maps\_utility;

main()
{
SetDvar("walking_holster",0);
players = GetPlayers();
array_thread(players,::walk_main);
array_thread(players,::rot_main);
}

walk_main()
{
self SetClientDvars("cg_bobWeaponAmplitude", "0.7");
self SetClientDvars("bg_bobAmplitudeStanding", "0.012 0.005");
self SetClientDvars("cg_bobWeaponMax", "3");
}

rot_main()
{
for(;;)
{
roll = self GetVelocity() * anglestoright(self GetPlayerAngles());
roll = roll/28;
if(!self.is_sliding)
{
if(GetDvarInt("walking_holster") == 1)
self SetClientDvar("cg_gun_rot_r",roll[0]+roll[1]+roll[2]);
else
self SetClientDvar("cg_gun_rot_r",roll[0]+roll[1]+roll[2]);
}
wait(0.1);
}
}

And Weapon Files
Code Snippet
Plaintext
standMoveF\0\standMoveR\0\standMoveU\0\standRotP\2\standRotY\0\standRotR\-2

derbergwalking
Last Edit: December 30, 2014, 10:42:23 pm by c.h.n
broken avatar :(
  • DeletedUser
  • Deleted Member
×
broken avatar :(
DeletedUser
This user is deleted :(
Updated with fixed sprint bobs and minor network optimizations

 
Loading ...