OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Llauma on 21 Jun 2005, 18:49:08
-
Hi,
I am currently making new heads for OFP and I plan to use new face textures which means that unfortunatly custom face textures wont be enabled but to counter this I thought of some sort of a ingame menu which allows the player to pic the face texture he wants to use instead of making it totally random.
The main idea is to have a menu at the start of the mission with thumbnails of the available faces of which the player can choose the one he likes. A slightly different idea is to have a text list or thumbnails of face textures and a cam infront of the player which shows how the texture looks on the model when he picks it. When he has found the face he wants he will just click confirm and start the mission.
The bad thing is that I don't really know much about scripting so perhaps someone here can at least tell me how complicated a feature like or similar to this would be to implement.
The goal with my head project is to make several different models and have a pool of 10-20 face textures for each model. This will involve caucasian, asian and african head models. If you think that you can give me a hand with scripting part it would be really appreciated.
(http://img297.echo.cx/img297/5834/headcarrey7es.jpg)
Here's a sample of the caucasian head with a Jim Carrey face texture. It's still beta but it's evolving.
//Llauma
-
SetObjectTexture tends to blur textures, and is generaly low quality. Have you tried something like
this setobjecttexture [0,"face2.paa"]If the quality from that is low.. :-\
If not, it's easy enough, just dialouge with various pictures, that run a script like
[player,"face2"] exec "changeFace.sqs"
_player = _this select 0
_face = _this select 1
_faceFull = FORMAT ["\ShineyFace\%1.paa",_face]
_player setobjecttexture _faceFull
exit
That'd set player's face to \ShineyFace\face2.paa
I've never really tried with dialouges, so can't help you there I'm afraid
Good luck :)
- Ben
-
We will check out a possible solution to the blurry textures and hopefully it will work. If anyone has some good solutions to how the face textures should be handled it would be great.
As for now I plan to make three different head models so the script should be able to handle that and allot the right texture class to the right model. Don't be shy to give your oppion about this as I am sure that most, if not all here are more skilled than me when it comes to scripting.
Here's another preview of the project so you'll know what you'll get involved with incase you are interested in helping us out. It's the african head model on lsr ranger body in O2. It's still work in progress so the final version will be even better.
(http://img26.echo.cx/img26/857/lsrafr014or.jpg)
-
_unit = _this select 0
_face = _this select 1
_type = typeOf _unit
;caucasian
_type1a = [soldier1,soldier2]
;asian
_type2a = [soldier3,soldier4]
;african
_type3a =[soldier5,soldier6]
?([_type] in _type1a):goto "type1"
?([_type] in _type2a):goto "type2"
?([_type] in _type3a):goto "type3"
HINT "Error : Player unit not Llauma head"
exit
#type1
_facePath = FORMAT ["\LlaumaFace\caucasian\%1.paa",_face]
_player setobjecttexture _faceFull
exit
#type2
_facePath = FORMAT ["\LlaumaFace\asian\%1.paa",_face]
_player setobjecttexture _faceFull
exit
#type3
_facePath = FORMAT ["\LlaumaFace\african\%1.paa",_face]
_player setobjecttexture _faceFull
exit
Easy enough. [player,face2] exec "script.sqs"
In that script, you need to put all the caucasian solider class names in that array, same with asians and africans. Then if it's african soldier classname, it applys
\LlaumaHead\african\face1.paa
If it's caucasian,
\LlaumaHead\caucasian\face1.paa
I'll have a look at the Dialouge creator program, might manage to make something useable outta it.. Maybe..
- Ben
-
Thanx alot.. It doesn't seem that complicated as even I can follow the logic in the script. Hopefully you'll get a grip of the dialogue making. Otherwise I could contact people who have done dialogues before.
-
Can you use the "setface" command?
--Ben
-
I think, from the screenies, the faces are to res textures for that to work. The BIS faces are limited in texture size (256x256) I'm sure.
- Ben