
Posts
93
Respect
18Add +1
Forum Rank
Rotting Walker
Primary Group
Donator ♥
Login Issues
Forgot password?Activate Issues
Account activation email not received? Wrong account activation email used?Other Problems?
Contact Support - Help Center Get help on the UGX Discord. Join it now!
// 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;
}

![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
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.

![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
Hi
Thx for sharing, but how can i install it?
- MrDunlop4
maps\name_of_gsc::main();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 SnippetPlaintextmaps\name_of_gsc::main();
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
Thx for helps, but it doesnt work yet.
MrDunlop4
What doesnt work? Thats the exact same way I did it
. I did everything wrong. Thx for helping dude.![]() | Has shown excellence and experience in the area of custom mapping in the UGX-Mods community. |
#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);
}
}standMoveF\0\standMoveR\0\standMoveU\0\standRotP\2\standRotY\0\standRotR\-2