Home   Help Search Login Register  

Author Topic: Problems with random face system  (Read 1939 times)

0 Members and 1 Guest are viewing this topic.

Serial Killer

  • Guest
Problems with random face system
« on: 11 Oct 2005, 20:16:46 »
I'm making some new units with llauma's head models, and as you know, they use whole new textures.
When my units starts inside a vehicle, they'll have normal BIS faces (bad ones). :o When they disembark the vehicle, they'll have the llauma's faces (good ones).
I'm not very sure waht's this problem about, but I think it's because of the random face script I'm using in my addon.

Code: [Select]
_unit = _this select 0
_frand = random(10)
_frand=_frand-(_frand mod 1)
_fpick= format ["ofpl_sol%1", _frand]
_fpick_d= format ["ofpl_sol%1_d", _frand]

_unit setface _fpick
@!(alive _unit)
_unit setface _fpick_d
exit

Help?

The KMan 3000

  • Guest
Re:Problems with random face system
« Reply #1 on: 12 Oct 2005, 01:39:06 »
It looks like you used the script from the Polish soldiers by Offtime. I tried this too and it didn't work. I had to download the Jon Doe addon from Offtime and copy the head model from the Jon Doe onto my soldier model. Then exec the script from the facetex.pbo that comes with Jon Doe. I uploaded it here http://rapidshare.de/files/6169307/jon_doe.zip.html.

This fixed the problems i was having with the faces, don't know if it will fix what you have. I never experienced that.

Serial Killer

  • Guest
Re:Problems with random face system
« Reply #2 on: 12 Oct 2005, 16:51:52 »
I am already using those head models and textures.

Kyle Sarnik

  • Guest
Re:Problems with random face system
« Reply #3 on: 12 Oct 2005, 21:32:23 »
Code: [Select]
_unit = _this select 0
_frand = random(10)
_frand=_frand-(_frand mod 1)
_fpick= format ["ofpl_sol%1", _frand]
_fpick_d= format ["ofpl_sol%1_d", _frand]

_unit setface _fpick
@!(alive _unit)
_unit setface _fpick_d
exit

Well if it doesn't work when in vehicles, I think it might be because (if the script is run from an init EH) _unit ends up being the vehicle that the unit is in, rather than the unit as part of the vehicle crew. Try using this to find out if I am correct:

Code: [Select]
? (vehicle _unit == _unit) && (vehicle _unit != driver _unit) : hint ":( wrong variable"

That will just give a hint message if _unit is the vehicle and not the unit.

Serial Killer

  • Guest
Re:Problems with random face system
« Reply #4 on: 13 Oct 2005, 14:07:06 »
I didn't get any hint messages when I used that command.