OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: surpher on 12 Jun 2004, 16:43:55

Title: condition of presence
Post by: surpher on 12 Jun 2004, 16:43:55
Hi all :wave:

Does condition of presence in the edit unit menu work?. Seems pretty basic but I cannot get it to work :(
Title: Re:condition of presence
Post by: CrashnBurn on 12 Jun 2004, 16:54:16
condition of presence has to be something that is true or false at mission load. It can NOT be something that happens later in the mission. About the only thing I ever used it for is to have a unit present or not based on players chosen skill setting. Example condition-

! cadetmode

The above condition is either true or false at mission load, so it works fine. If you place a condition there that won't happen until later in the mission, you're basically expecting the units initialization to act as a trigger to periodically check your condition and it doesn't work that way. All initialization parameters are finalized at mission load. I hope this explains it ??

To have a unit placed later on, the 'createunit' command is your friend. Get my createunit tutorial here--->  http://www.ofpec.com/includes/download2.php?id=603
Title: Re:condition of presence
Post by: surpher on 12 Jun 2004, 17:03:18
That's why I can't get it to work then. I hoped to have a unit appear part way through a mission. Thanks for your help CrashnBurn
:cheers:
Title: Re:condition of presence
Post by: macguba on 12 Jun 2004, 18:51:11
I use it to make random patrols.    Create the patrol commander, give him a probability of presence and write

alive commandername

in the condition of presence field of each of his squad.   That way, they only appear if he does.