Page 1 of 2
Camo Skins
Posted: Sat Oct 16, 2010 10:44 am
by Anonymouse
Does anybody know how to make a Skin/Model with a hidden weapon? (Like the metroid larvae) I'm trying to make camouflage skins and the weapons are ruining the whole camouflage. Just wonder, being able to blend in with your surroundings. Cool right? :scool:
Even better, does anybody know how to make a uscript that allows the skin to mimic the texture it is touching? Like Metal Gear Solid 4 Octocamo, or the Shrikes in MM invasion servers.
Thanks,
Anon.
Screenshot of 3 sample skins from the skin pack I'm working on:

Re: Hidden Weapon Skins
Posted: Sat Oct 16, 2010 3:09 pm
by DW_Ant
Very minimal coding needed. All you need to do is create a subclass of the weapon, and change the default skins to a transparent texture.
But for the mimicking texture, it may be a bit more complicated since you could be touching the wall, the ceiling, the floor, or any surface with multiple skins at once (like the terrain). First you have to decide which surface you're going to mimic, then temporarily set the texture of your weapon to the material you're mimicking.
Re: Hidden Weapon Skins
Posted: Sat Oct 16, 2010 3:43 pm
by Anonymouse
1. How would I force the skins to use custom textured weapon files? Such as the ground skin in the middle of the picture, (I don't think you can even see it's body lol) how would I add the texture to the weapon and how would I force it to use the weapon. Also, I only want 1 file per skin. (.ucl)
2. Is it possible that I could force the skin to use the texture it is touching? For example, in Nevermoretankmeup, there are tons of skins on the ground. If I were standing on a certain one, the skin would blend itself into the texture it is touching. (Like octocamo)
One more thing, how would I force it to use a texture that it is touching on a wall without making it switch to the one it is touching on the ground?
3. Do you know of any good transparent textures I could use? I spent some time searching and I found nothing good.
Thanks.
Re: Camo Skins
Posted: Sun Oct 17, 2010 11:40 pm
by DW_ChocoCake
An easier way would be to create a mutator which sets Weapon.ThirdPersonActor.bHidden = true for your weapon. You could also make the default mesh none, that might work too. You wouldn't have to subclass all of the weapons so it is much easier.
Re: Camo Skins
Posted: Mon Oct 18, 2010 1:30 am
by DW_Ant
I don't think he wants the weapon to be completely invisible... does he?
Re: Camo Skins
Posted: Tue Oct 19, 2010 12:20 am
by DW_ChocoCake
If he doesn't want that then he can change the skin of the weapons using a mutator. He could camouflage the weapons like what the Shrikes do to their skin. All you need to do is a trace in the -z direction which can get you the material the weapon is above. Then set the RepSkin of the ThirdPersonActor of the weapon to the material of the floor. This is exactly what the Shrikes do. If that is too fancy he can set the default skin for the meshes to an translucent texture which can make it look cloaked.
Re: Camo Skins
Posted: Fri Oct 22, 2010 7:33 am
by Anonymouse
What's the code from the shrikes? I would like that on the weapon skin and the player skin.
If you don't know the exact code, is there a .u or .upl?
Re: Camo Skins
Posted: Sat Oct 23, 2010 9:48 pm
by DW_ChocoCake
Here is the relevant code:
Code: Select all
singular simulated function Camouflage(bool adoptSurroundings)
{
local int i;
local actor traceActor;
local material newSkin;
local vector HitLocation, HitNormal;
if (adoptSurroundings)
{
Projectors.Remove(0, Projectors.Length);
bAcceptsProjectors = false;
AmbientGlow = 0;
if ( Level.NetMode != NM_DedicatedServer )
{
traceActor = Trace(HitLocation,HitNormal, (Location + ((CollisionHeight * 1.5) * vect(0,0,-1))), Location, false,,newSkin);
// Fallback to this if for some reason we can't get a texture
if (newSkin == None)
NewSkin = Shader'AW_Research.Fur.FurShader';
for (i=0; i<20; i++)
Skins[i] = newSkin;
}
bCamouflauged = true;
}
else
{
bAcceptsProjectors = true;
AmbientGlow = 30;
if ( Level.NetMode != NM_DedicatedServer )
{
for (i=1; i<20; i++)
Skins[i] = Shader'BioBudTexturesB.Shrike.Body';
Skins[0] = FinalBlend'BioBudTexturesB.Shrike.Feathers';
}
bCamouflauged = false;
}
}
Re: Camo Skins
Posted: Mon Oct 25, 2010 7:58 pm
by Anonymouse
Thanks Choco. Do I put that in the .upl file?
Re: Camo Skins
Posted: Mon Oct 25, 2010 8:19 pm
by DW_Ant
.u