Results 1 to 5 of 5
  1. #1
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Posts
    58

    Default Custom weapon model doesnt show

    Hiya, Im having a real hard time getting my weapon model to show up.
    The weapon works perfectly but it just doesnt show up when I run the game. I'm only interested in getting the 3rd person view model and I'm just trying to get one of the UT models to test it.

    As Im deriving the new weapon from UTWeapon and having looked through that and the other weapon classes it seems like I should just be able to set the model in the default propeties of my weapon liek this:

    Code:
    	// Pickup staticmesh
    	Begin Object Name=PickupMesh
    		SkeletalMesh=SkeletalMesh'WP_RocketLauncher.Mesh.SK_WP_RocketLauncher_3P'
    	End Object
    However this doesnt work. Ive also tried to modify the attachweaponto function but I havent had any luck with it and it doesnt seem like I should have to do that anyway.

    Can anybody point me in the right direction with this?

  2. #2
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Posts
    191
    Gamer IDs

    Gamertag: madeinkenya

    Default

    Have you created an weapon attachment class, this is where the mesh is attached in 3rd person, look at UTWeapon line 1103
    Code:
    simulated function AttachWeaponTo( SkeletalMeshComponent MeshCpnt, optional Name SocketName )
    Here is a sample of my attachment class
    Code:
    class KDAttachment_MyWeapon extends UTWeaponAttachment;
    
    defaultproperties
    {
    	// Weapon SkeletalMesh
    	Begin Object Name=SkeletalMeshComponent0
    		SkeletalMesh=SkeletalMesh'WP_SuperSoaker.mesh.SK_WP_SuperSoaker_3P'
    		//AnimSet'WP_SuperSoaker.Anims.K_WP_SuperSoaker'
    	End Object
    
        MuzzleFlashSocket=MuzzleFlashSocket
    	MuzzleFlashPSCTemplate=WP_ShockRifle.Particles.P_ShockRifle_3P_MF
    }
    http://larryweya.wordpress.com/ - Game Dev Tutorials and Random Rumblings

  3. #3
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Posts
    58

    Default

    Ah thank you so much I had been thinking that the pickupmesh was used for the 3p mesh.

    On the subject of weapons Is there any way to set weapons per team. So a pawn on team 1 can only pickup weapons that are defined as team 1 weapons etc?

  4. #4
    MSgt. Shooter Person
    Join Date
    Nov 2009
    Posts
    191
    Gamer IDs

    Gamertag: madeinkenya

    Default

    I would implement it in PickupFactory and DroppedPickup. Both have a ValidTouch function which call WorldInfo.Game.PickupQuery so perhaps in your own game class you could override this function and check for the proper team vs weapon.
    http://larryweya.wordpress.com/ - Game Dev Tutorials and Random Rumblings

  5. #5
    MSgt. Shooter Person
    Join Date
    Oct 2010
    Posts
    58

    Default

    great thanks!


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.