News / Random Face System - Released
Random Face System - Released
Andersgrim has released his Random Face System on the BIS Forum. This is not a complete addon. It is meant to be implemented with new addons in development. The Random Face System is a system randomly applying textures to a model. It will not work with OFP versions below 1.75. Here is an excerpt from the readme:
#### Description
The progress of the system can be described as follows:
1. A unit executes a script at missionstart, using the “Init” eventhandler. This is defined in the config.cpp. 2. The script generates a random number (between 0 and 10 in this example). 3. The script applies a face to the “face” selection on the model, the specific face depending on the random number generated above. 4. The script then rotates a small axis (“faceaxis”) in the model, with a rotationvalue depenging on the random number.
When the unit is killed in the game:
6. The unit executes another script using the “Killed” eventhandler. 7. Depending on the rotationvalue of the model, the script applies the correct wound texture.
#### Usage
In order for your to integrate this system to your addon, you will have to modify:
1.The model. a) You have to make sure all the faces belong to the “face” selection. b) A point must be included in all the LODs where the texture is going to be randomly applied. This point must belong to the “faceaxis” selection. c) The selection of textures you want the model to randomly pick from must ALL be applied to the model. One face per texture should be enough. This to prevent blurred faces. d) I would recommend you to change the modelname to one of your own choice. NOTE:When you change this name, you have to update the CfgModels part of the config.
2.The rfsys_dead.sqs and rfsys_face.sqs scripts a) Change all the texture entries with your choice of textures. If you want to, you may use the textures that comes with this example file, located in the ‘F’ folder. b) Add or remove texture entries to fit with your desired amount. I am not aware of the maximumlimit, but I would stop at 0.99. c) Increase/decrease the random values to fit with your amount of entries.
3.The config a) Change all names to whatever you desire b) Remember to update the paths so they point to your addon folder. If your addon is called addon1.pbo, the path will be \addon1\

