Author Topic: setRandomZombieAppearance  (Read 3848 times)

setRandomZombieAppearance

Have you ever wanted zombie bots to have random appearances like in Left 4 Block?
WELL NOW YOU CAN!

Images:



Doesn't overwrite default event:



GIVE IT TO ME NOW!
« Last Edit: May 14, 2016, 07:27:26 PM by Menderman »

downloading this af because ive always wanted to make my own version of this event

downloading this af because ive always wanted to make my own version of this event
It's just a simple edit of the SetAppearance event, I changed the randomized skin and face selector. This had to be a separate event because the options (like City and Space) just set the decals and hats.

Also I messed up the topic title silly me.

You should force require Bot_Hole and then delete everything before function AIPlayer::setRandomZombieAppearance( %obj, %style )

You should force require Bot_Hole and then delete everything before function AIPlayer::setRandomZombieAppearance( %obj, %style )
Done and done. Thanks for the tips.

Also going to try Blockland Glass, I'll put up the download once appealed.
« Last Edit: May 14, 2016, 08:21:48 AM by Menderman »

Blockland Glass download is now up!

couldn't you add appearances to the setRandomAppearance instead of making a whole new one? if not then thats kinda dumb

couldn't you add appearances to the setRandomAppearance instead of making a whole new one? if not then thats kinda dumb
You can't, and here's why:
Quote from: setRandomAppearance
function AIPlayer::setRandomAppearance( %obj, %style )
{
   // colors
   %skinColor = getRandomBotSkinColor();// getRandomBotColor();
   %handColor = %skinColor;
   
   %hatColor = getRandomBotColor();
   %packColor = getRandomBotColor();
   %shirtColor = getRandomBotColor();
   // %pantsColor = getRandomBotColor();
   // %shoeColor = getRandomBotColor();
   %accentColor = getRandomBotColor();
   
   %pantsColor = getRandomBotPantsColor( %shirtColor );
   %shoeColor = %pantsColor;
   
   // zero everything out
   %hat = 0;
   %accent = 0;
   %pack = 0;
   %pack2 = 0;
   %decal = "AAA-None";
   // %face = "smiley";
   %face = getRandomBotFace();
Here are the skin and face settings in event.cs in the Bot_Hole Addon. First off, you'd need to replace the event.cs file in order to add something to it. The skin and face selectors are before the options (city and space), making it not possible to change the skins and faces for a certain type of option.

Quote from: setRandomZombieAppearance
function AIPlayer::setRandomZombieAppearance( %obj, %style )
{
   // colors
   %skinColor = "0.626 0.71 0.453 1";// getRandomBotColor();
   %handColor = %skinColor;
   
   %hatColor = getRandomBotColor();
   %packColor = getRandomBotColor();
   %shirtColor = getRandomBotColor();
   // %pantsColor = getRandomBotColor();
   // %shoeColor = getRandomBotColor();
   %accentColor = getRandomBotColor();
   
   %pantsColor = getRandomBotPantsColor( %shirtColor );
   %shoeColor = %pantsColor;
   
   // zero everything out
   %hat = 0;
   %accent = 0;
   %pack = 0;
   %pack2 = 0;
   %decal = "AAA-None";
   // %face = "smiley";
   %face = "asciiTerror";
Here's the skin and face selectors in setRandomZombieAppearance. Once again, they are before the options of city and space. However, here I ahve replaced the skin and face selectors with set options, to look like the default zombie bots.

So, in a nutshell, it would be extremely difficult to have the zombie appearances in setRandomAppearance.
« Last Edit: May 15, 2016, 07:47:47 AM by Menderman »

Could you make this work with the player?
I have an event that lets you set the random appearance in events under Player as City and Space.
Could you do the same and make this usable under Player events?