Home   Help Search Login Register  

Author Topic: Probability of presence: Explain this to me  (Read 1232 times)

0 Members and 1 Guest are viewing this topic.

Aculaud

  • Guest
Probability of presence: Explain this to me
« on: 28 Sep 2002, 04:31:27 »
I need an Empty vehicle and a soldier to not be there at first, but get there after something happens. I tried messing around with the probability of presence function, but i dont get it.

What exactly happens when you set the POP to something other than TRUE? Does the editer move the units to someplace completely different and then move them back, or just not completely create them until the cndition is met?

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Probability of presence: Explain this to me
« Reply #1 on: 28 Sep 2002, 05:09:28 »
You are mixing two different (similar) things.

1) Probability of presence = a power bar, where you can
set a percentage for the probability of presence.
This means, if you set it to 50%, there's a 50/50 chance,
that the unit will be present, when the mission starts.

2) Condition of presence = a boolean, to decide wether
the unit will be (or not) present at the start of the mission.
:note - you can't combine the condition of presence for
a unit of group1 with the presence of a unit from another
squad (at least until 1.46 - not tested in 1.75 yet).
You can use e.g:
group leader: set the probability of presence to 50%
and put into each soldier's condition of presence field
(soldiers of this squad only):
alive leader_name

In both cases, you can't use it to let units appear later
in the mission.
If you want to let appear units at certain events, then better
use the createvehicle command, or a simple setpos/getpos.

hope this clears things

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Probability of presence: Explain this to me
« Reply #2 on: 28 Sep 2002, 05:10:37 »
Welcome to the forums, Aculand :)

The probability of precence condition is executed at the start of a mission. This means there aren't many conditions that are actually useful... basically it's:
  • cadetmode - Only place the unit if the mission is played in cadet mode
  • not cadetmode - Only place the unit if the mission is played in veteran mode

    And possibly (I haven't tried this myself):
  • benchmark > 1000 - Only place the unit if the playing computer's benchmark is greater than 1000
So just to clarify, the probability of presence line is executed only at the start of the mission... you can't set a variable to true and have your guy drop in (at least not using that method ;D)

The way I would generally do it is make a guy not in the playable area, then at the specific time (using a trigger or script) move the unit to where I want them using:

unit setpos [ x,y,z ]
or
unit setpos (getpos anotherunit)

Failing that you could use the createunit/createvehicle command... for that I suggest you grab yourself the Official command Reference and check it out. Also you might want to try the Editor's Depot FAQ.

Good Luck  ;)

Offline Chris Death

  • Former Staff
  • ****
  • Finally Death's gonna get ya
    • OFPEC
Re:Probability of presence: Explain this to me
« Reply #3 on: 28 Sep 2002, 05:16:35 »
lol SUI, i think we can never learn enough.

You see, basically we had the same suggestions, but
still in a different kind of use. Never thought about the
cadet/veteran to use it there  ;)

I've been always using it for the random presence of a whole
squad  :D

~S~ CD
Dont argue with idiots....they will bring you down to their level and beat you there with experience.

How to use Waypoint type Scripted

Offline Sui

  • Former Staff
  • ****
    • OFPEC
Re:Probability of presence: Explain this to me
« Reply #4 on: 28 Sep 2002, 05:22:46 »
Oh yeah... forgot about that one ;)

Very good for the old random patrols...

Aculaud

  • Guest
Re:Probability of presence: Explain this to me
« Reply #5 on: 28 Sep 2002, 06:43:21 »
Ahhh, right right. Forgot about the setpos getpos method. I think this will work just fine, and on that note, those offshore islands will come in quite handy ;)

Thanks all :)