OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Serial Killer on 03 May 2005, 18:56:23

Title: "Chaning clothes" possible?
Post by: Serial Killer on 03 May 2005, 18:56:23
Is it possible to change clothes in OFP? Like chanching model or textures, etc. etc. Possible?
Title: Re:"Chaning clothes" possible?
Post by: dmakatra on 03 May 2005, 19:06:48
Nop.

:beat: *Gets Shot* :beat:
Title: Re:"Chaning clothes" possible?
Post by: Garcia on 03 May 2005, 20:27:44
Errrm, I'm quite sure I saw someone do this a few years back...
Title: Re:"Chaning clothes" possible?
Post by: h- on 03 May 2005, 21:44:13
Only possible by doing a 'mini-campaign' (one mission in several parts, and between those parts the clothes get changed...) or with respawn in MP...
Title: Re:"Chaning clothes" possible?
Post by: Morglor9 on 03 May 2005, 23:20:38
would a new addon where the clothes are objecttextures work, so that you can use the setobjecttexture command like you do to change the nose paint on the nam pack hueys?
Title: Re:"Chaning clothes" possible?
Post by: Terox on 04 May 2005, 14:14:45
There is a way, might not be the ideal solution for what you want to do, however its the only way i know of

what you can do is the following


a) create a group of units Iideally 2)
..... 1 playable & 1 not playable
b) set respawn to group
d) when you want to change clothes, kill yourself, and you will automatically be transferred into the body of the new unit, and in the clothes for that class of unit
e) setpos that unit to your dead body
f) remove your dead body

to reduce the visualisation of dying and respawning, set respawn delay to 0.001


you need 1 unit alive before you die to respawn into
so what you can do is start with a spare unit and then on your death create a spare unit

this can all be incorporated into an Action available in your menu list
Title: Re:"Chaning clothes" possible?
Post by: Serial Killer on 04 May 2005, 16:28:56
Is it possible in singlemissions?
Title: Re:"Chaning clothes" possible?
Post by: macguba on 04 May 2005, 16:58:50
No.   No respawn in SP.   You have to use the mini-campaign workaround.
Title: Re:"Chaning clothes" possible?
Post by: Serial Killer on 04 May 2005, 17:33:32
You know that BAS Tonal campaign? In first mission - if you die, you can play it again with new unit :o How is it possible?
Title: Re:"Chaning clothes" possible?
Post by: macguba on 04 May 2005, 20:26:28
I have no idea.  Why not unpbo it and find out?
Title: Re:"Chaning clothes" possible?
Post by: Serial Killer on 04 May 2005, 20:41:23
I deleted it and it's over 100mt. Don't want to download it again for that..
Title: Re:"Chaning clothes" possible?
Post by: dmakatra on 04 May 2005, 21:54:57
Well I just played it and I sure AFAIK you ain't alive when you see the big red letters saying "YOU ARE DEAD". If you get an extra life why did nobody tell me? So much retry-pressing gone to waste. :-\

:beat: *Gets Shot* :beat:
Title: Re:"Chaning clothes" possible?
Post by: hermano on 24 May 2005, 17:06:57
Yes it is possible to some degree. BAS did it.
Have a look at the randCivieInit.sqs located in the FX folder of the BAS_OPCPP.pbo:

_unit = _this select 0

_randInt = loadFile "\BAS_OPCPP\FX\randInt.sqf"


_randHead = [0,5] call _randInt
_randTop = [6,11] call _randInt
_randTrouser = [12,17] call _randInt

; head
call format ["_unit setobjecttexture [%1,{\BAS_opfor\civ\bas_a_face_%2.pac}]",_randHead,_randHead+1];

; top
call format ["_unit setobjecttexture [%1,{\BAS_opfor\civ\bas_a_civ_%2.pac}]",_randTop,_randTop-5];

; trouser
call format ["_unit setobjecttexture [%1,{\BAS_opfor\civ\bas_a_civ_%2.pac}]",_randTrouser,_randTrouser-11];

exit

The problem is you will need a model that supports this and some textures. Have a look at the BAS Opfor files. I experimented with this a little, one problem is that you can change the appeareance of a unit only for a few times (~5 times, this was related to a pivots thingy, has been some time since I had a look at it) and only the textures.
h

Edit:
You could also remote control other units, look for a mission called 'fake' I posted there:
http://www.sinewsofwar.com/forum/viewtopic.php?t=48&postdays=0&postorder=asc&start=0&sid=0e35e19b26cafb03baa91a18f7085106

Later in the same thread I posted a 'changecloth' mission, using the bas functionality.
Hope this helps...
h
Title: Re:"Chaning clothes" possible?
Post by: DBR_ONIX on 10 Jun 2005, 14:45:38
You can remove helmets etc, so if you took this idea, and extended it, you could setobjecttexture various clothes/items (hide certain layers of clothing etc), you could have a wide selection of clothes..
For (simple) example, to change a top colour, and change it from long sleeve to short-sleeve, you make a selection out of the top and arms, then using setobjecttexture, you change the top colour to the new texture, and setobjecttexture the arms to textre ""

Only thing is, setobjecttexture is limited to the texture size it works with
- Ben
Title: Re:"Chaning clothes" possible?
Post by: bdfy1 on 01 Aug 2005, 14:06:37
Quote
You know that BAS Tonal campaign? In first mission - if you die, you can play it again with new unit  How is it possible?
interesting...
can anyone rip and post this mission here ?
Title: Re:"Chaning clothes" possible?
Post by: DBR_ONIX on 01 Aug 2005, 14:36:34
The code's posted there inthe linked thread, it just setobjecttextures various parts to new clothes ;)
- Ben