Jump to content
Sign in to follow this  
OxPecker

Ai sunglasses and faces

Recommended Posts

Just a very quick ME question - is there anything I can put in an AI's init. field to specify which face he has and if he is wearing glasses (sunglasses or spectacles). If this can be done, where can I find a list of faces and corresponding numbers?

Thanks in advance.

Share this post


Link to post
Share on other sites

you have to define class in description.ext and then use it along with "setidentity" command in the init field of the soldier.

</span><table border="0" align="center" width="95%" cellpadding="3" cellspacing="1"><tr><td>Code Sample </td></tr><tr><td id="CODE">

class CfgIdentities

{

Identities[] = {};

class ralphy

{

name = "ralphy";

face = "face26";

glasses = "spectacles";

speaker="Adam";

pitch = 1.00;

};

};<span id='postcolor'>

and use setidentity command in the init line of each soldier that needs face.

just for reference, Guba is face15, Blake is face16.(not sure about number though) the face number is in order in which you can view from your profile setup. 1.46 had upto 99, i beleive.

for changing glasses, you can use "spectacles" or "sunglasses"(i'm not sure on sunglass one).

you canalso define speaker and pitch of voice.

Share this post


Link to post
Share on other sites

Thanks for the info Ralph, I was hoping not to mess around with .ext files, but if that's the only way, then I guess it'll do.

Share this post


Link to post
Share on other sites

Actually you can change the face just typing this on the unit's init box:

this SetFace "facexx"

Where xx is just a number -> 01, 33... etc (don't know how many faces, I guess about 50 or so)

Don't have a clue if this is also possible for glasses.

Regards

Share this post


Link to post
Share on other sites

Awesome! I'll try this out as soon as I get home, thanks! smile.gif

Share this post


Link to post
Share on other sites

/bump

smile_o.gif

I'm having the opposite problem - how to get rid of glasses! crazy_o.gif

I've got the exact same setface command for two AI soldiers. There's not setIdentity command for them.

The mission starts off at around 8AM on a winters day. No glasses on soldier #1. I then use the skipTime command to forward the time to about 17:20. It's dark outside and soldier #2 is wearing sunglasses - the dummy! wow_o.gif

What's causing this? rock.gif

Can glasses be forced off? rock.gif

UPDATE: I bypassed the problem by coding a cfgIdentities entry used by both AIs. No more glasses.

Yet it still has to be asked: are glasses a potential randomized possibility or was something else triggering the AI unit to have glasses?

Also, a suggestion for OFP2: change the setFace command to the following syntax:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">unit setFace [face, glasses, mimic]

Allow for all values to be set to "random" and for glasses to be set to "none"

Share this post


Link to post
Share on other sites

If your not using cfgidentities i believe the face and glasses are done at random. But as far as wearing sunglasses at night maybe the soldier was trying to keep track of visions in his mind  tounge_o.gif

OK bad joke but i couldnt help quoting the song  wink_o.gif

Share this post


Link to post
Share on other sites
If your not using cfgidentities i believe the face and glasses are done at random.

Then I would suggest to BIS to consider not allowing sunglasses at random when the unit's start time in the game is at night. smile_o.gif

Or, if BIS wants to really be nifty, they can support UV ray transition lenses that change shades according to the amount of sunlight. biggrin_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×