Posts
159
Respect
55Add +1
Forum Rank
Pack-a-Puncher
Primary Group
Member
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!![]() | |
![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |
![]() | Has shown excellence and experience in the area of custom scripting in the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
![]() | Has released one or more maps to the UGX-Mods community. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
Can I play an animation on the player current weapon by script? Not a "default" animation like reload, fire, etc.
You can make a new weapon and change the animations used for that weapon.
But if you mean play an animation on the current viewarms holding the current weapon, the easiest way I achieved that was through additional weapon files with different fire and reload anims. I would forceviewmodelanimation on the other weapon file. Settings get tricky.
But an easier way to do that with a weapon file is to just make the weapon file an alt of the weapon, and in the alt animation you put the animation you want to play. You would script it to switch back, and this wouldn't work with weapons that had alt weapons already very easily. Plus you have some menu editing for the alt image and counter to not display.

![]() | Has released one or more maps to the UGX-Mods community. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
I don't know what that is, but would maybe earthquake work for that? It shakes your whole screen... Or is it like an actual shaking of the gun or something?
If you use the alt weapon thing, just freeze switching, switch to alt weapon, wait for it to be done anim, and switch back, and un freeze, I would think. You will have to add checks for it though, maybe with a waittill_any for weapon changes and complete weapon changes in a loop to make sure it doesn't get stuck, and doesn't get given back when they are downed or something.

Just a quick shake of the gun, thanks for the tip
Could maybe use just the dvars cg_gun_x/y alternatively very quickly to simulate the viewmodel moving from side to side?
![]() | Has released one or more maps to the UGX-Mods community. |
![]() | Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community. |
![]() BO3 Modtools Alpha | This user has access to the Black Ops 3 Modtools Alpha |
How could I use that?
function name()
{
while(1)
{
currentweapon = self GetCurrentWeapon();
if( ( currentweapon == "portalgun" || currentweapon == "portalgun_upgraded" ) )
{
self setClientDvar( "cg_gun_z", -1.5 );
}
else
self setClientDvar( "cg_gun_z", 0 );
wait .1;
}
}I've heard that is a host only dvar, is that true?

Really thanks, saved me from doing another animation on maya
Idk how it is supposed to look (never played any of the Portal games) but honestly I think MakeCents suggestion about using 'earthquake' is the simplest and best solution.


![]() | Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum. |