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

Move view models, without editing the anims?

broken avatar :(
Created 12 years ago
by epicduck97
0 Members and 1 Guest are viewing this topic.
3,139 views
broken avatar :(
×
broken avatar :(
Location: usSD
Date Registered: 30 May 2013
Last active: 4 years ago
Posts
44
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
epicduck97's Groups
epicduck97's Contact & Social Links
Is there anyway to move a gun in the first person further away from you player? Is there any setting in the gun, for the position relative to the player? Can you do this without editing the anims?
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 21 March 2014
Last active: 9 months ago
Posts
227
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
My Contact & Social Links
More
Personal Quote
I the Mighty
×
ConvictioNDR's Groups
In the stand, crouch, and prone movement settings of the weapon file. You can mess with those numbers until you reach what you are looking for.
broken avatar :(
×
broken avatar :(
Location: usSD
Date Registered: 30 May 2013
Last active: 4 years ago
Posts
44
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
epicduck97's Groups
epicduck97's Contact & Social Links
In the stand, crouch, and prone movement settings of the weapon file. You can mess with those numbers until you reach what you are looking for.

I mean move the position of the gun, in the first person view.. I dont want to change how the gun moves in the anims..
Marked as best answer by epicduck97 12 years ago
broken avatar :(
  • steviewonder87
  • Deleted Member
×
broken avatar :(
steviewonder87
This user is deleted :(
Yes,
Code Snippet
Plaintext
self setClientDvar( "cg_gun_x", -5 );

for example would move the gun back 5 units, you can just type the command in the console if you want to try it out.

Your welcome.  ;)

Edit: Obviously if you want the gun further away from you then use positive numbers.
Last Edit: July 18, 2014, 12:15:49 am by steviewonder87
broken avatar :(
×
broken avatar :(
Location: usSD
Date Registered: 30 May 2013
Last active: 4 years ago
Posts
44
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
epicduck97's Groups
epicduck97's Contact & Social Links
Yes,
Code Snippet
Plaintext
self setClientDvar( "cg_gun_x", -5 );

for example would move the gun back 5 units, you can just type the command in the console if you want to try it out.

Your welcome.  ;)

Edit: Obviously if you want the gun further away from you then use positive numbers.

Thats a really nice way of doing it! thanks.. Is there another one for rotation? And also is there anyway to initiate this on start, or embed this in the weapon file, because its kinda a hassle to check every time if the player has the gun, and if so move it back.. Cause I only want this to happen with a couple of my custom guns..
broken avatar :(
  • steviewonder87
  • Deleted Member
×
broken avatar :(
steviewonder87
This user is deleted :(
If I answered your question can you mark my answer as 'Best answer' then please?

I'm no scripter but I did manage to make this which I've tested and should work  :P
Put this at the bottom of your mapname.gsc

Code Snippet
Plaintext
gun_move()
{
while(1)
{
currentweapon = self GetCurrentWeapon();
if( ( currentweapon == "ADD NAME OF WEAPONS YOU WANT TO MOVE HERE" ) )
{

 self setClientDvar( "cg_gun_x", -5 ); //change this number to whatever you want obviously
}
else

 self setClientDvar( "cg_gun_x", 0 );
wait .1;
}


And add

Code Snippet
Plaintext
 {
 players[i] thread gun_move();
}

after 
Code Snippet
Plaintext
players = get_players();
 for(i=0;i<players.size;i++)

also in your mapname.gsc  :)
broken avatar :(
×
broken avatar :(
Location: usSD
Date Registered: 30 May 2013
Last active: 4 years ago
Posts
44
Respect
Forum Rank
Legless Crawler
Primary Group
Member
×
epicduck97's Groups
epicduck97's Contact & Social Links
If I answered your question can you mark my answer as 'Best answer' then please?

I'm no scripter but I did manage to make this which I've tested and should work  :P
Put this at the bottom of your mapname.gsc

Code Snippet
Plaintext
gun_move()
{
while(1)
{
currentweapon = self GetCurrentWeapon();
if( ( currentweapon == "ADD NAME OF WEAPONS YOU WANT TO MOVE HERE" ) )
{

 self setClientDvar( "cg_gun_x", -5 ); //change this number to whatever you want obviously
}
else

 self setClientDvar( "cg_gun_x", 0 );
wait .1;
}


And add

Code Snippet
Plaintext
 {
 players[i] thread gun_move();
}

after 
Code Snippet
Plaintext
players = get_players();
 for(i=0;i<players.size;i++)

also in your mapname.gsc  :)

yea I was gonna do that, but It would just be alot easier if I could just move it in the weapon file lol Im lazy, thanks man - teddi

 
Loading ...