For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com

Skins

The section related to UnrealScript and modding. This board is for coders to discuss and exchange experiences or ask questions.
User avatar
Pyro
OldUnreal Member
Posts: 592
Joined: Wed Jul 18, 2007 5:35 pm

Skins

Post by Pyro »

Hey all,

i geussed this was the right forum :P

I would like to select a specified skin for each map, so you have derest skins in a desert map. I geuss i have to do this with a mutator? dont worry about the skins, i got them myself.

someone? :P :D
Image
Jâçkrâßßit

Re: Skins

Post by Jâçkrâßßit »

there is a function in UScript called GetURLMap(). You could use this function in a mutator in an auto state or somthing to get the map name. Then you could create multiple functions like:

MapName1()
{
(add code for changing default male/female skins here)
}

MapName2()
{
(add code for changing default male/female skins here)
}


It's a little more detailed then that, but I have done stuff like this before. Maybe later I will pull out some of my older mutator code and help you out for this. (after all, I am part of the team hehe)
User avatar
.:..:
OldUnreal Member
Posts: 1637
Joined: Tue Aug 16, 2005 4:35 am

Re: Skins

Post by .:..: »

You can do it pretty simply like this:

Code: Select all

var Texture FemaleSkins[2],MaleSkins[3];
var bool bInitilized;

function PostBeginPlay()
{
      if( bInitilized )
            Return;
      bInitilized = True;
      Switch( Caps(string(Outer.Name)) )
      {
            Case "NYLEVE":
                  FemaleSkins[0] = ANyLeveFemale1Skin;
                  FemaleSkins[1] = ANyLeveFemale2Skin;
                  MaleSkins[0] = ANyLeveMale1Skin;
                  MaleSkins[1] = ANyLeveMale2Skin;
                  MaleSkins[2] = ANyLeveMale3Skin;
                  Break;
            Case "DMDECK16":
                  FemaleSkins[0] = ADeckFemale1Skin;
                  FemaleSkins[1] = ADeckFemale2Skin;
                  MaleSkins[0] = ADeckMale1Skin;
                  MaleSkins[1] = ADeckMale2Skin;
                  MaleSkins[2] = ADeckMale3Skin;
                  Break;
      }
      if( MaleSkins[0]!=None ) // At least some skin was set...
            SetTimer(1,True);
}
function Timer() // Do it the ugly hack way (due to players can change their skins mid-game without any proper function calls)
{
      local Pawn P;

      if( Level.Game.NumPlayers==0 ) Return;
      For( P=Level.PawnList; P!=None; P=P.NextPawn )
      {
            if( P.bIsPlayer && PlayerPawn(P)!=None && P.Mesh!=None )
            {
                  Switch( P.Mesh )
                  {
                        Case Mesh'Female1':
                              P.Skin = FemaleSkins[0];
                              Break;
                        Case Mesh'Female2':
                              P.Skin = FemaleSkins[1];
                              Break;
                        Case Mesh'Male1':
                              P.Skin = MaleSkins[0];
                              Break;
                        Case Mesh'Male2':
                              P.Skin = MaleSkins[1];
                              Break;
                        Case Mesh'Male3':
                              P.Skin = MaleSkins[2];
                  }
            }
      }
}
1823223D2A33224B0 wrote:...and now im stuck trying to fix everything you broke for the next 227 release xD :P
(ಠ_ಠ)
Jâçkrâßßit

Re: Skins

Post by Jâçkrâßßit »

cool  :)

nice work with the array structure dots... looks alot more organized than my script, but ironicly.. both of ours scripts do the same thing.

oh yeah, and in my post I said "auto state" when I meant function timer().....  whoops.

I'll have to save this code for custom playerpawn overwrites as well for certain maps
Last edited by Jâçkrâßßit on Mon Jan 28, 2008 2:12 am, edited 1 time in total.
sm1key

Re: Skins

Post by sm1key »

hhe nice nice :)  I think you helped me and pyro and the rest of our mod team a good hand! thanks :)

BTW our futuring working on something that we wil try to get automatic skin change in game with ranking based on score is that posible the idea  that if you get a reach of a top score that match a rank in our system or by a database like a ini.. you automatic get a change of you uniform with a military rank update in game? or  do we need it to keep this basic terms offline ..

Like we made now basic skins based on U.S.A.F. (US.Airforce) uniforms  of the stargate teams .. inclusief sholder ranking (stripes like [>>] )  so when you get  uhh 2000000 points you get a new rank auto update on you uniform..  just like in battlefield2 but there its above your head in game... ?  

our skins are based on the teams and races of the Movie and Seasons.... . and there are availble for clans ..  

leader of clan  get a basic high officer uniform in all camo styles.
his co  leaders get colonel or major ranked uniforms
and lower ranked officers get lower ranked uniforms..
and soldiers get prived /cadet ranked uniforms..  

This is standaard availeble for clans or teams for TDM matches or Coop gamestyle..   but we want to make later in game a kinda RPG game style addon to our mod so people get rankings  ingame or by viewing there skills and scores on the future website..  (scores the made on our public servers)

well let me know if its posible ? hehe..  much more to tell or to explain but ...  thanks
Last edited by sm1key on Sat Feb 09, 2008 12:13 am, edited 1 time in total.
Jâçkrâßßit

Re: Skins

Post by Jâçkrâßßit »

can you also setup a mutator to replace the default player class?

Or can that only be done with a game type?

Return to “UScript Board”