Home   Help Search Login Register  

Author Topic: Specifying a default face for an addon (without initstring usage)  (Read 874 times)

0 Members and 1 Guest are viewing this topic.

Baphomet

  • Guest
Is there any way via cpp, or addon-specific script to determine a default face for an addon? If so I'd be appreciative if anyone could show me how.

Offline Tomb

  • Contributing Member
  • **
  • in2 Metal? Go 2 my sig


You mean like, making sure that EACH time this specific unit (className) is placed
on the map, then he/she will have the SAME face  ??? :)


This, off course, is only good for very unique addons. Like if ya make a president or alike  8) ;D
Anyho' - here's ONE way to do it:

In the cpp, put an EventHandler to the unit (firing an INIT script).
The script then glues the proper face to the guy - very simple stuff, actually.


Like this:

===========================

_T1 = _this select 0

_T1 setface "tmcm1"
_T1 setmimic "Agresive"
goto "T"

#T
~0.4
? getdammage _T1 >=0.85: _T1 SetFace "tmcm1d", exit
goto "T"



======================

This scroll is one I used for a biker unit I made; it also makes sure that he gets the correct blood textures if he gets killed.
(I was having trouble with some reskinned RES civilians, so I forced them to do my will via scripts like the one above)  >:( ;D

Just make a faceTexture & a bloodFace, and be sure to include them in the config.cpp file  :-*

Should look a bit like this:

====================================================

class CfgFaces
{
            class tmcm1
           {
                   name="tmcm1";
                   texture="\troublemakers_mc\men\tmcm1.paa";
                   guer=1;
            };

            class tmcm1d
            {
                    name="tmcm1d";
                    texture="\troublemakers_mc\men\tmcm1d.paa";
                    guer=1;
            };
};

===================================================



 :D See?!  


Basically, it's just two normal faceTextures. Thats how U can do it if you're having trouble
with the normal procedure.
Just remember that it will glue the SAME face on the unit EVERY dayum time you use him ingame!

Like I said - only for very induvidual.... uuuum, individuals  ::) :-X ;D



 ( And yes, it's a weird workaround, but it works like a charm ingame!  :)  )