OFPEC Forum

Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: ManatArms on 23 Jun 2006, 05:31:09

Title: Problem with ´this setbehaviour "safe"´
Post by: ManatArms on 23 Jun 2006, 05:31:09
Hi, again I got a problem.

In the mission I made, there are serveral enemy contacts at different positions. After taking out one enemy-squad, I want my squad to return their weapon on their back, until they meet the next enemy.

I tried to trigger it, by "East not present" and then, Â'[units-name] setbehaviour "safe"Â'. But it doesnÂ't work. So I gave waypoint-orders, but they only run around instead of walking with rifle on back. Can anybody help me?
Title: Re: Problem with ´this setbehaviour "safe"´
Post by: The-Architect on 23 Jun 2006, 11:38:49
Write a script that checks whther there are any enemy units within a certain distance of your group. If not the script sets your guys to safe.
Title: Re: Problem with ´this setbehaviour "safe"´
Post by: ManatArms on 23 Jun 2006, 13:50:01
Could you give me a short example for that script?
Title: Re: Problem with ´this setbehaviour "safe"´
Post by: Northgarden on 23 Jun 2006, 16:24:58
I just tried putting this in a waypoint... i call my group bot1

{bot1 setbehaviour "safe"} forEach units group this

It seemed to work. :)
Title: Re: Problem with ´this setbehaviour "safe"´
Post by: Trapper on 23 Jun 2006, 16:46:04
I'm just guessing:

-There is "safe" and "careless" mode.
-Your group is under AI control.

In safe mode they decide on their own when the time has come to return to walking after engagement. Try to make them careless to override their decisions.
Title: Re: Problem with ´this setbehaviour "safe"´
Post by: Chris Death on 24 Jun 2006, 01:29:45
I guess YOU are leader of the group and YOU are not having YOUR weapon on back - well at least
that's what i read out of your explanation.

If you are groupleader, your group will not put weapons on their back unless you do so.

e.g. try to start with your group in safe mode and then get down right after the mission starts.
You'll see that your loons will also get their rifles in their hands. Once you put weapon on back,
they will follow.  ;)

Solution is: don't be groupleader or probably try 'careless' - though not sure about the careless version
as i can't test it now.

~S~ CD
Title: Re: Problem with ´this setbehaviour "safe"´
Post by: ManatArms on 24 Jun 2006, 05:58:04
1. Er.. no, i am not the leader, i am the last soldier of the group.

2. I think, Careless would not be good, because they wonÂ't react as fast as in other modes.
Title: Re: Problem with ´this setbehaviour "safe"´
Post by: The-Architect on 24 Jun 2006, 10:40:59
Set them to careless and then after their weapons are on their backs set them to safe.