Warning: include(/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php): failed to open stream: No such file or directory in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Warning: include(): Failed opening '/var/www/html/forum/Sources/../../../includes/depot_files/OFPEC_get_header_image.inc.php' for inclusion (include_path='.:/usr/local/lib/php') in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 146

Notice: Undefined index: OFPEC in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152

Notice: Trying to access array offset on value of type null in /var/www/html/forum/Sources/Load.php(2272) : eval()'d code on line 152
    Home   Help Login Register  

Author Topic: Custom face for enemies  (Read 1719 times)

0 Members and 1 Guest are viewing this topic.

Offline dr. seltsam

  • Members
  • *
Custom face for enemies
« on: 25 Aug 2010, 19:04:06 »
I did run into a problem here...

I have a mission where i want to set special custom faces for the enemies. I made a folder inside the mission folder
Faces

Inside this folder we have several face .jpg files with the format 256X256. Then i have a description.ext:
Code: [Select]
class CfgFaces
{
class cface1
{
name="cface1";
texture="Faces\cface1.jpg";
};
};
I have a default (non addon) soldier on the map named s1. Then there is a radio trigger with the code line:

s1 setFace "cface1"

But it doesn´t work.

An alternative description.ext is:
Code: [Select]
class CfgFaces
{
class cface1
{
name="cface1";
texture="Faces\cface1.jpg";
};
};

class CfgIdentities
{
class zombie1
{
name = "zombie1";
face = "cface1";
glasses = "none";
speaker = "Rich";
pitch = 1.0;
};
};
And the command line is:

s1 setIdentity "zombie1"

... doesn´t work. I tried it with .paa formated files, but same problem then. Is there any way to bring custom faces to my enemies? I know that many addon config.cpp files have the class CfgFaces. Can i define such a class in my description.ext aswell ?? And how?
« Last Edit: 25 Aug 2010, 19:07:27 by dr. seltsam »

Walter_E_Kurtz

  • Guest
Re: Custom face for enemies
« Reply #1 on: 27 Aug 2010, 16:09:07 »
This has been asked before (search 'OFP Editing / Scripting General' for "CfgFaces") and I'm not aware that anyone has got round it. What it seemingly boils down to is:

you can't use CfgFaces in the description.ext of a mission.

You need to put the faces you'll want to use in an addon pbo with the CfgFaces section in the config. (Do the above search and you'll find some config examples). Your mission can still use a CfgIdentities section in description.ext to make use of those faces.

I haven't found the setFace command to be particularly reliable. The details aren't saved and so tend to get lost when reloading. Much like the setObjectTexture command... It's better to use identities.

Offline bedges

  • Administrator
  • *****
    • OFPEC The Editing Center
Re: Custom face for enemies
« Reply #2 on: 28 Aug 2010, 14:01:41 »
Take a look at this tutorial.

As Walter indicated, a quick search of the forum and depots will usually answer your question faster than typing it.  :good: