OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: izaktj on 17 Dec 2008, 13:50:29
-
My mission is almost done, however I noticed that east soldiers are not targeting policemen (civillian side) KEEPING the civillian side, not joining a west soldier, etc. Is there a way to do this?
If not via initializing or triggers, I guess I could edit the config file inside the PBO to make the unit west. But I don't know how to do that either.
BTW, the policemen DO target east soldiers. The policemen are on the civilian side.
Thanks for the help, much appreciated. :D
-
You could try the addRating (http://www.ofpec.com/COMREF/index.php?action=details&id=11) command, with a negative number. That would mean everyone would shoot at the policemen, but depending on who else is present at the time that may be enough to solve the problem.
-
LMAO it didn't work, they started shooting at each other lol. But it was funny though.
-
Group the policeman with a high ranking (actually I am not sure the rank is relevant, but it might be) west soldier (west soldier to be the leader). Set the West soldier's condition of presence to False so that he does not appear in the mission. You will now have a policeman that is on the West side and so East soldiers will attack him. If you don't want him to be attacked immediately setCaptive True would stop that, then setCaptive False when you want him to be attacked. You may also need to set his behaviour to Careless to avoid him hitting the deck when east soldiers are close by.
-
THobson has the solution there. You do need to make the west unit higher ranked than all the other units, so he will set the side. :D
-
Thanks, but there is another problem. If he is the leader and set the condition of presence to false, the animation won't work.
{(vehicle _x) animate ["ani_siren", 1]} foreach units group this
-
Alternatively you can edit the side of the civilian units to east or resistance (if "resistance belongs to" is set to side east or nobody in the editor) in the mission.sqm file; you have to be aware though that you must not edit the unit again in the editor afterwards because this will change their side back to civilian or morph them into regular east or resistance soldiers.
-
That sounds fairly simple. What do you mean by "editing the unit"?
BTW, is there a link to a tutorial of this method?
-
Save your mission once you are sure you will never have to modify again the unit, then quit ofp and go in your hard drive in your ofp folder, go in "user" part and find your mission, then open the missions.sqm file with wordpad or any document prog, then find in the line of the right unit and erase his side part, write another side for replace it...
Save and launch ofp, open the editor, load the mission and save.
(be care: as said zwobot if you edit the unit again in the editor you will disable the effect and make the unit as originaly!)
-
Did you put:
{(vehicle _x) animate ["ani_siren", 1]} foreach units group thisIn the init field of the leader? If so then because he does not exist in the mission the code will not be run. Try putting it in the init field of a unit that will exist in the mission.
I believe the side of the group is set by the side of the leader, irrespective of his rank. From memory I thought the rank only impacted how likely the units were to run away.