OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: Gielovic on 31 Mar 2003, 19:03:38

Title: Probability of precense with groups
Post by: Gielovic on 31 Mar 2003, 19:03:38
I've a question. I've two infantry squads with M5truck. I want to make a mission where the probability of precense for both groups 50% is.
If one squad is present the other will be too.
If one squas isn't present the other won't be too.
If i set the pr of pre for each unit i get incomplete groups and only one group at the time
please help me?
Title: Re:Probability of precense with groups
Post by: macguba on 31 Mar 2003, 20:01:39
Make your two squads.    Give everybody a 100% probablility of presence except one of the squad leaders.    Make his probability 50%


ooooohhhhh I can't quite remember the next bit ...... in the init field of the 50% leader write

present1=true

and in the Condition of presence fields of all the other soldiers (both groups) write

present1

That way, if the leader comes into existance all the others will too, and if he doesn't, they won't.

I haven't got my OFP at the moment so I can't check if this is exactly it, but try it and see.
Title: Re:Probability of precense with groups
Post by: Sui on 01 Apr 2003, 01:49:45
Just a quick refinement of Macca's method (which works fine by itself). ;)

Rather than having to make a new variable for each group, just name the leader.
Now in the Condition of Presence field for each of your soldiers, put:

(alive leader)

Where leader is the name of their leader.
You can use this method to create random patrols, to add increased replayability to the mission :)
Title: Re:Probability of precense with groups
Post by: macguba on 01 Apr 2003, 11:12:16
that's it!   I knew I was remembering it slightly wrong .... thanks Sui.

What I also do is combine this technique with probability for each individual soldier .... so if I want a squad of about four I'll have eight soldiers all on 50% (plus the condition of course).     That way somtimes the squad has a medic/AT/RPG/MG etc (or two) and sometimes it doesn't.

Needless to say I often put a placement radius on the leader too. ;D
Title: Re:Probability of precense with groups
Post by: Gielovic on 01 Apr 2003, 17:57:02
Thanks guys