View Full Version : Randomizing Textures?
legacy-sI_Dj_:p
08-07-2003, 07:45 PM
I have an idea for a cool thing for a mod that I'm making up. I was wondering if there was anyway to asign a bunch of textures to an object and everytime it is spawned or created in the game the computer will randomly select of of them.
Can this be done? Thanks.
legacy-sI_Dj_:p
08-09-2003, 03:37 PM
No one knows? Maybe I'll have to go research on this one.
legacy-inio
08-09-2003, 06:45 PM
You can set the textures on a mesh/staticmesh through the skins[] property. If you had the object randomly assign to that array I think it would do what you wanted.
legacy-Sett
08-10-2003, 02:36 AM
something like this (pseudo code-ish)
simulated function PostBeginPlay()
{
int Rnum;
Rnum=Rand(4);//random num. generator
Switch(Rnum)
{
case 0:
skin[0]=skin1
break;
case 1:
skin[0]=skin2
break;
..etc
}
}
every time this actor would be spawned it would spawn with a different, random skin.
legacy-sI_Dj_:p
08-10-2003, 04:20 PM
Thanks, thats just what I wanted. I'll fool around a little with it and see what happens.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.