OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: paper plane on 08 Feb 2004, 11:34:47
-
HI ! Anyone have ideas for create a script to change the side of the unit in the mission.
for example: I have a civ unit(police cz75) , and some guer unit. but the guer unit unable to fire for civ unit. and If I fire for them will get minus score. and I use "dofire" script is also unable to work. so I want to change the side of my unit. ???
-
simple, group em t a soldier of the enemy side which has equal or greater value (eg if the police is a private, the soldier is a corpral) and then U put deleteVehicle this in the init of the soldier
-
HuNtA is right.
However, once the mission has started I don't think you can change the side of a unit.
-
Maybe this would work mid-mission -
Let's say you have a group of armed civilians. To put them on the west side at the start of a mission, you group them to a high-ranking west unit, and then put "deleteVehicle this" into the west unit's init line.
It might (and I've never tried this) work mid-mission if you call a little script at the right moment that uses createUnit to make a high-ranking east unit who is in the same group as the civilians, kind of like:
"soldierEB" createUnit [getpos near_civvies, civvies, "deleteVehicle this" ,"COLONEL"]
Hope that helps,
Ade
-
;) I have done , Thanks to all.