Home   Help Search Login Register  

Author Topic: condition of presence  (Read 1304 times)

0 Members and 1 Guest are viewing this topic.

Offline Blanco

  • Former Staff
  • ****
condition of presence
« on: 13 Apr 2005, 02:51:40 »
There a field named "condition of presence" in the properties of a unit. I know what it means, but I don't know the usage.

I have 3 difficulty levels (easy, medium & hard) defined in a variable diff
? Diff == 0 means you are playing in easy mode
? Diff == 1 means you are playing in medium mode?
? Diff == 2 means you are playing in hard mode

There are some units on my map with 60% probability of presence, this is for the medium mode. When you play the mission on hard mode I want to change this in 100%
Am I in the right field for this and what do I have to write in it?
Search or search or search before you ask.

Offline THobson

  • OFPEC Patron
  • Former Staff
  • ****
Re:condition of presence
« Reply #1 on: 13 Apr 2005, 07:41:48 »
There is a probability of presence and a condition of presence.

The probability is a sliding scale and I have found no way to change it other than in the editor.

The condition of presence is a boolean.  What I have found about that field is:

- the OFP engine resolves that value before running init.sqs so putting a variable in there does not help control which units are created.
- the not condition needs to be used with care (eg not (alive unit1) will always resolve as false and the unit will never appear)

One possibility is:

Have different units for the hard, easy and medium, levels each with their own probabilities of presence.  When you establish the difficulty level then do a deleteVehicle on those you don't want.

Another option is to create all the units with 100% probability and then randomly delete some, the number you delete depending on the difficulty level.
« Last Edit: 13 Apr 2005, 08:21:39 by THobson »

Offline Blanco

  • Former Staff
  • ****
Re:condition of presence
« Reply #2 on: 13 Apr 2005, 07:56:45 »
Ok, thanks, I think I choose for that 2th option :)
Search or search or search before you ask.

bdfy1

  • Guest
Re:condition of presence
« Reply #3 on: 14 Apr 2005, 11:36:21 »
You can type
Quote
!cadetmode
in unit's condition of presence line. Then this unit will appear only if you are playing veteran mode ;)