Custom weapon skin for my subclassed weapon?

Search and find cool Skins, or introduce your own ones!
1337GameDev
Experienced
Posts: 130
Joined: Thu Apr 16, 2020 3:23 pm
Personal rank: GameDev

Custom weapon skin for my subclassed weapon?

Post by 1337GameDev » Wed Jul 21, 2021 9:52 pm

I created a custom weapon based on PulseGun, and want it to have a custom texture for it's pickup and left/right hand models.

How is this done? I know that actors generally have a field: MultiSkins but i'm unsure how this is used for models.

I have seen code similar to:

Code: Select all

Self.MultiSkins[0] = texture(DynamicLoadObject(NewPulseGunTexture ,class'Texture',false));
and don't see how this would work for the pickup and item meshes..... I assume this code will be placed in "PreBeginPlay" function?

I have already extracted and slightly modified the PulseGun texture, but unsure how to set it for my custom subclass....

I see the Texture property, but this seems to be the ACTOR property, such as the standard "HorseHead" for actors.

Ideas/ thoughts?

User avatar
sektor2111
Godlike
Posts: 5428
Joined: Sun May 09, 2010 6:15 pm
Location: On the roof.

Re: Custom weapon skin for my subclassed weapon?

Post by sektor2111 » Fri Jul 23, 2021 8:29 pm

Texture is representation of Actor in DrawType DT_Sprite - Navigation Points as a sample.
If actor has display DrawType DT_Mesh there is in account Skin or MultiSkins[x] depending on what sort of mesh has actor.
By example a pupae can be modified as a PulseGun based on MultiSkins[x], Skaarj it's using Skin.
I've adjusted these by adding actor in map and testing which section has to be altered using another stock Texture.

Stunts:
- textures can be configurable somewhere and loaded based on certain factors - maybe in whatever Auto State letting actors to be initialized if they are used to do this;
- using multiple options for actor Weapon itself auto morphing itself based on some INI.

For me "dynamicload" would be the last solution because I think it's slow, more slow than using an internal embedded texture or a package referenced.

1337GameDev
Experienced
Posts: 130
Joined: Thu Apr 16, 2020 3:23 pm
Personal rank: GameDev

Re: Custom weapon skin for my subclassed weapon?

Post by 1337GameDev » Sat Jul 24, 2021 6:19 pm

I'll try what you suggest, and let you know if that works.
sektor2111 wrote:
Fri Jul 23, 2021 8:29 pm
If actor has display DrawType DT_Mesh there is in account Skin or MultiSkins[x] depending on what sort of mesh has actor.
By example a pupae can be modified as a PulseGun based on MultiSkins[x], Skaarj it's using Skin.
I added a custom Skin texture in the default properties block, and it didn't show up.... Why is this?