A mesh's skin?

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

smattbac

Flak Monkey
Nov 28, 2000
185
0
0
Finland
www.multi.fi
Sorry if this is a silly question, but how do you find out what skin a mesh has?

I'm not talking about looking in the MyActor.Skin array.

In UnrealEd, you can go to Animations and then in the mesh tab under Skins you can see them.

I'm specifically trying to find out what skin(s) a weapon has.
 

Romanov

New Member
May 8, 2003
86
0
0
UK
why not just go into the animations or static mesh tabs on unrealed , open up the relevant weapons package and then look under "skins" in animations and "material" under static meshes, that will give u the location of the skin in the textures package.
 

smattbac

Flak Monkey
Nov 28, 2000
185
0
0
Finland
www.multi.fi
Romanov said:
why not just go into the animations or static mesh tabs on unrealed , open up the relevant weapons package and then look under "skins" in animations and "material" under static meshes, that will give u the location of the skin in the textures package.

Yes, I know, but I want to do this from UnrealScript, since the weapon's skin(s) I'm looking for, can be any weapon that the pawn is currently using.
 

BlackHornet

Global Warzone Project Leader
Apr 24, 2002
76
0
0
43
Aachen - Germany
www.hornet-maps.de
you have to differ between third person view and first person.

third person is should be....

Pawn.ThirdPersonActor.Skins array

... if i remember right. But if you wanna get the skins of a mesh you have to iterate through the actors skins list.

PS: maybe it is Pawn.Weapon.ThirdPersonActor.Skin (im not sure the moment)
 

Dryn

New Member
Feb 20, 2003
128
0
0
Visit site
... urm... Though this fails for static meshes, you can still use the .skins array for bone and vertex meshes. I'll bet that the weapon mesh you have is not a static mesh, and thus, I can pretty much tell you that Pawn.Weapon.Skins should probally work, provided Pawn.Weapon != none and the weapon actually has a skin associated with it.

As for comparing textures, as to finding out what skin is on the weapon, I'm not 100% sure on all the opporations (if any) you can use on variables of the type Texture. However, it would guess that at the very least you could go if(Pawn.Weapon.Skins == none || Pawn.Weapon.Skins == Texture'BLAAAARG'). [Someone correct me if I'm wrong on that]
 
Last edited:

smattbac

Flak Monkey
Nov 28, 2000
185
0
0
Finland
www.multi.fi
Dryn said:
... urm... Though this fails for static meshes, you can still use the .skins array for bone and vertex meshes. I'll bet that the weapon mesh you have is not a static mesh, and thus, I can pretty much tell you that Pawn.Weapon.Skins should probally work, provided Pawn.Weapon != none and the weapon actually has a skin associated with it.


No, that doesn't work (I've tried, Weapon.Skins.Length is 0), since the weapon uses the original skin that came with the game, and that is set, I assume, when it was imported to the game. Where it is stored is beyond me. There's no Weapon.Mesh.Skins array.

I don't need to compare the skin with anything.
 

Dryn

New Member
Feb 20, 2003
128
0
0
Visit site
Ah, so the initial skin, if unchanged using the skin array, is the default skin for the mesh... Can you access mesh.skin or the like? Or perhaps you should just overide this by adding to the skin array when you need it?

Oh, and for the static meshes: they will not accept skin changes. They do not use the skin array, and the only way to modify the material used on a static mesh is to change it via the static mesh browser. Perhaps someone has found another method, but anything that would work on a more dynamic mesh has absolutely 0 result on a static mesh; ingame or in ued.
 

BlackHornet

Global Warzone Project Leader
Apr 24, 2002
76
0
0
43
Aachen - Germany
www.hornet-maps.de
there are several ways. On is to use an own StaticMshActor class wherer bStatic is false, what might be the thing cause you cannot change its skins. Because look the code snip:

Code:
EClass = Spawn(class'WoodExplosion',,,Location+ExplosionDimensions*VRand());
if ( EClass != None )
{
	EClass.CalcVelocity(vect(0,0,0),ExplosionSize);
	EClass.SetDrawScale(RandRange(FragmentSize[0], FragmentSize[1]));
	EClass.Skins[0] = FragmentMaterial;
}

thats a snip from my breakable class. Its a modified StaticMeshActor.
You can see....I Spawn a ChunkClass (WoodExplosion) which is in my case the FlakChunk and set a new Skin to it.
It works fine and i set bStatic=false in this class