Advertisement
Treedestroyed

fatcockmesh

Jan 9th, 2021
3,037
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. simulated function UpgradeWeapon()
  2. {
  3.     if(CanUpgradeWeapon())
  4.     {
  5.         SetWeaponUpgradeLevel(CurrentWeaponUpgradeIndex + 1);
  6.        
  7.         DetachWeapon();
  8.         AttachWeaponTo( Instigator.Mesh );
  9.     }
  10. }
  11.  
  12. simulated function AttachWeaponTo( SkeletalMeshComponent MeshCpnt, optional Name SocketName )
  13. {
  14.     if ( MySkelMesh != None && CanUpgradeWeapon() )
  15.     {
  16.         if ( CurrentWeaponUpgradeIndex == 1 )
  17.         {
  18.             MySkelMesh.SetSkeletalMesh(SkeletalMesh'WEP_1P_AK74U_MESH.AK74U_Rig');
  19.         }
  20.         else if ( CurrentWeaponUpgradeIndex == 2 )
  21.         {
  22.             MySkelMesh.SetSkeletalMesh(SkeletalMesh'WEP_1P_AK74U_MESH.AK74U_Rig');
  23.         }
  24.     }
  25.    
  26.     super.AttachWeaponTo(MeshCpnt, SocketName);
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement