OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Varry on 22 Jun 2003, 05:01:32

Title: How can i place a custom face on a AI character?
Post by: Varry on 22 Jun 2003, 05:01:32
Can someone please help me? I created a custom face and i need to place it on an AI controlled character (for the storyline), could somebody tell me how to do it.

Greetz,
Varry
Title: Re:How can i place a custom face on a AI character?
Post by: _hammy_ on 22 Jun 2003, 07:11:35
put this in the dudes init field:

this setface "Face10"
Title: Re:How can i place a custom face on a AI character?
Post by: Varry on 22 Jun 2003, 13:29:40
Can you be more explicit? i mean for example: My custom face is called "face1.jpg", where must i put the jpg file? And Once the jpg's in place, should i just type setface in the init field?

Greetz,
Varry
Title: Re:How can i place a custom face on a AI character?
Post by: Black_Feather on 22 Jun 2003, 22:43:42
Its been a long time since I last did this but the face should go here

C:\Program Files\Codemasters\OperationFlashpoint\Users\YourName\missions\MissionName

and then use this in the init field

this setface "face1.jpg"
Title: Re:How can i place a custom face on a AI character?
Post by: Black Fox on 24 Jun 2003, 05:25:45
What about adding glasses? I've tried this without much success.
Title: Re:How can i place a custom face on a AI character?
Post by: Black Operative on 24 Jun 2003, 21:07:58
What about adding glasses? I've tried this without much success.

For this you go best with using the description.ext and creating an identity. Put this into the description.ext file in the mission folder:

"spectacles"
// "sunglasses


class CfgIdentities
{
  class Unit
  {name = "John Doe";
   face = "face1";
   glasses = "spectacles";
   speaker = "Jonah";
   pitch = 1.0;};
};



For making the unit wear sunglasses just replace "spectacles" with "sunglasses".  8)


And then in the unit's init line put:

this setIdentity "Unit"


Alpha out. :)
Title: Re:How can i place a custom face on a AI character?
Post by: Black Fox on 25 Jun 2003, 05:43:29
Nice one, thanks.