OFPEC Forum
Addons & Mods Depot => OFP - Addons & Mods General => Topic started by: goki on 08 Aug 2005, 16:04:46
-
Hi,
we are making a soldiers pack and we put custom faces in .pbo.
We use a random-face-selector script, attached to this message.
We call this script via "init" line of every soldier in config.
In single player missions, when player saves his/ her game, aborts and resumes again the problem arises. Faces selected in the beginning of the mission don't remain the same. Of course its the principle of the script but this time, original ofp faces are selected as well! we don't want this!
We want to keep the same faces, selected at random, from the beginning of the mission till the end.
How can we do this? We can use description.ext identities of course but, we want a random fashion and don't want to use description.ext all the time.
G.
-
The 'setface' command is bugged, as you have found out. After loading a saved game, the faces are reverted back to the original ones. :-\
'Setidentity' works fine, so you will just have to make a ton of identities in the description.ext.
If you are really dead-set on using the 'setface' command, there is one way to detect if a saved game is loaded: the "time" variable will be reset to 0. So if you did something like saved each unit's face in a global variable/array, and then reset them whenever the "time" var was reset to 0, then you might be able to work around it.
But that seems more complicated than using identities.
-
Hi again,
sorry for delay lol.
I think we should remove the f..ing script and keep it with description.ext fashion. This way mission makers enjoy the principle and the use, eh?
The second looks so weird and tough, also may arise some timing problems right? about time of the day, war etc...
thanks for your kind support man,
so long,