Home   Help Search Login Register  

Author Topic: random selected custom faces don't remain the same till the end of the mission!  (Read 1206 times)

0 Members and 1 Guest are viewing this topic.

Offline goki

  • Members
  • *
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.
« Last Edit: 08 Aug 2005, 16:14:50 by goki »

Offline General Barron

  • Former Staff
  • ****
  • Semper Fi!
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.
HANDSIGNALS COMMAND SYSTEM-- A realistic squad-control modification for OFP
kexp.org-- The best radio station in the world, right here at home! Listen to John Richards!

Offline goki

  • Members
  • *
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,
« Last Edit: 12 Aug 2005, 15:09:49 by goki »