OFPEC Forum
Editors Depot - Mission Editing and Scripting => OFP - Editing/Scripting General => Topic started by: MarkQuinn on 29 Apr 2004, 03:33:39
-
Is there a way to change the side of a unit?
In other words, say I have "west-soldier". I want to place "west-soldier" on the map but I want him to fight for the east side.
My apologies if this question has been asked (many times) on this forum.
Thank you.
Mark
-
BTW I did find this:
Q.
How change west soldier to resistance category?
A.
#define TEast 0
#define TWest 1
#define TGuerrila 2
#define TCivilian 3
#define TSideUnknown 4
#define TEnemy 5
#define TFriendly 6
#define TLogic 7
#define true 1
#define false 0
#define private 0
#define protected 1
#define public 2
class CfgPatches
{
class SoldierName
{
units[] = {SoldierName};
weapons[] = {};
requiredVersion = 1.01;
};
};
class CfgVehicles
{
class All{};
class AllVehicles:All{};
class Land:AllVehicles{};
class Man:Land{};
class Soldier:Man{};
class SoldierWB:Soldier{};
class SoldierWG:SoldierWB{};
class SoldierName:SoldierWB
{
displayName="Soldier Name";
model="pbo filep3d file";
side=TGuerrila;
weapons[]={"M16","Throw","Put"};
magazines[]={"M16","M16","HandGrenade"};
};
};
I was actually looking for something simple that can be done in the INIT field. Am I out of luck?
MQ
-
You can group west soldiers to east soldiers of a higher rank and they will consider themselves to be East soldiers.
You can do this and then use deletevehicle this on the east group leader and the effect will be the same, but you will just see the lone west guy (who will fight as an east guy) in the game.
Haven't tried making west soldiers join east soldiers while the game is actually running, but I don't see why it wouldn't work.
-
Thanks Seal. I was leaning in this direction myself but hadn't considered the deletevehicle command. I was actually going to set the east leader's health to zero and use a script to get rid of all dead bodies on the field. Your idea is better. Thank you!
MQ
-
rgr that 8)
-
Haven't tried making west soldiers join east soldiers while the game is actually running, but I don't see why it wouldn't work.
Nah, unfortunately it doesn't work. The east soldiers will still think the west guy is an enemy, and just kill him. Can't remember if the west guy will shoot at west guys though....
-
I think it's also possible to replace "west" with "east" in mission.sqm for the unit.
-
I think it's also possible to replace "west" with "east" in mission.sqm for the unit.
It works perfectly. Thank you!
Mark