OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started 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?
-
Nop.
:beat: *Gets Shot* :beat:
-
Errrm, I'm quite sure I saw someone do this a few years back...
-
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...
-
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?
-
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
-
Is it possible in singlemissions?
-
No. No respawn in SP. You have to use the mini-campaign workaround.
-
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?
-
I have no idea. Why not unpbo it and find out?
-
I deleted it and it's over 100mt. Don't want to download it again for that..
-
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:
-
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
-
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
-
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 ?
-
The code's posted there inthe linked thread, it just setobjecttextures various parts to new clothes ;)
- Ben