Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Make Afrenian Army enemy?

  1. #11
    Default = afrenian army is blufor.
    I want them to be opfor.

  2. #12
    1) Open a blank test mission in editor
    2) Create OPFOR units in editor with respective unit types (TL, GL, Medic etc)
    3) Create the BLUFOR Afrenian army team
    4) Save mission
    5) Open up mission.sqm and copy all class names from both unit equivalents to a separate document
    6) Open actual mission
    7) Create UPSMON squads as opfor units used in test mission. (Ie Taki Army TL = Afrenian Army TL)
    8) After mission is finished, save mission. Quit editor
    9) Open mission.sqm and use CTRL-H to replace all unit types from their Taki models to Afrenian equivalents.
    10) Save mission.sqm in notepad and open the mission in the editor. Save from within the editor and export the mission.

    OPFOR will be afrenian army. No strings attached

    This also works with player units btw.

  3. #13
    Slightly confused will discuss over ts.

  4. #14
    Are you making this MP compatible? If not then you could also possibly use the "addSwitchableUnit" and ""selectPlayer" commands to switch into whatever unit you want when the mission is setup.

    I did this on one of my campaign missions where I was spawning Dualan civilians (armed) which are by default side "EAST". I was able to spawn them as side "Resistance" by using the probability of presence "0" method via script, make them switchable, addswitchable all the units then play as whoever you want. Perhaps this is also possible with what you are trying to do.

  5. #15
    MP only at this stage.

  6. #16
    Master Gunnery Sergeant twirly's Avatar
    Join Date
    Sep 13 2010
    Location
    Gods Own (NZ)
    Posts
    1,302
    I made these last functions last night as I needed to make East hostile to Civilians. One or all might work for you mate.

    In your init.sqf:-
    Code:
    fn_unitSwitchSide = compile preprocessFileLineNumbers "func\fn_unitSwitchSide.sqf";
    
    fn_grpSwitchSide = compile preprocessFileLineNumbers "func\fn_grpSwitchSide.sqf";
    
    fn_facSwitchSide = compile preprocessFileLineNumbers "func\fn_facSwitchSide.sqf";
    fn_unitSwitchSide.sqf will switch a unit to another side... returns the unit.

    fn_grpSwitchSide.sqf will switch a group to another side... returns the group.

    fn_facSwitchSide.sqf will switch a faction to another side... returns the list of groups.


    The scripts....

    fn_unitSwitchSide.sqf:-
    Spoiler:


    fn_grpSwitchSide.sqf:-
    Spoiler:


    fn_facSwitchSide.sqf:-
    Spoiler:



    Call examples:-
    Code:
    _unit = [_unit,west] call fn_unitSwitchSide;    //switch one unit to WEST
    
    _group = [_group,east] call fn_grpSwitchSide;   //switch one group to EAST
    
    _groups = [_group,west] call fn_facSwitchSide;  //switch a whole faction to WEST... the function needs a group as input
    Hope you... or someone... gets some joy out of them.

    EDIT: Added demo mission here.
    Last edited by twirly; Apr 12 2012 at 00:50. Reason: Added stuff

    "Learn by doing!" - Quoted from a post by Imutep

    OUTERRA - OUTERRA - OUTERRA - OUTERRA - BLOWMIND!

  7. #17
    Thanx mate, will check it out

  8. #18
    You really shouldn't complicate things if all you want is some Afrenians in opfor.

    Changing mission.sqm should work, however it will need to be done ever time after you save the mission and before you turn it into a PBO. Not sure if it'll work if you turn it into PBO in-game, you might have to turn it into PBO with an extrenal tool.

    What I find easier is simply giving each Afernian group a Takistani leader with probability of presence being 0. Don't place the UPSMON init in the Takistani solider's init line, but rather in the init line of whoever will become the leader once the game decides the Takistani leader will not spawn. In general, that would be the highest ranking soldier in the group, and in case of equal ranks, the one linked first is chosen (so make sure nobody has a higher rank than whoever you want to lead the group, and that you always link the leader to the 0% presence takistani before you link the rest of the group).


    If you still can't get either of the above to work, the only thing I can tell you is to post a youtube video to show what the hell you're doing wrong. Because it really should be *that* simple.


    If you want to change sides during mission via script (which UPSMON will not like! Unless you do it on units right as they spawn and before you start UPSMON on them!), you will have to create a new EAST group, and have the Afrenians join it using the joinSilent command.

  9. #19
    Master Gunnery Sergeant twirly's Avatar
    Join Date
    Sep 13 2010
    Location
    Gods Own (NZ)
    Posts
    1,302
    Quote Originally Posted by galzohar View Post
    If you want to change sides during mission via script (which UPSMON will not like! Unless you do it on units right as they spawn and before you start UPSMON on them!), you will have to create a new EAST group, and have the Afrenians join it using the joinSilent command.
    Which is exactly what one of the functions above does!

    Code:
    _group = [afrenian_group,east] call fn_grpSwitchSide;
    How hard is that?
    Last edited by twirly; Apr 11 2012 at 01:36.

  10. #20
    @galzohar
    I had actually got it to work the way you suggested but it seemed like there should be an easier way particularly if I'm creating 15 different upsmon patrols.

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Seize zones Duala [Afrenian VS Molatian] (SP)
    By stiff in forum ARMA 2 & OA - USER MISSIONS
    Replies: 14
    Last Post: Aug 20 2010, 18:56
  2. Anyone know how to make 1 civilian enemy to all
    By Zonekiller in forum ARMA 2 & OA : MISSIONS - Editing & Scripting
    Replies: 5
    Last Post: Dec 6 2009, 14:21
  3. How do you make a car the enemy
    By Tom_Anger in forum ARMA - MISSION EDITING & SCRIPTING
    Replies: 3
    Last Post: Nov 26 2008, 13:47
  4. How do i make enemy not
    By jjj666 in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 12
    Last Post: Apr 22 2003, 13:29
  5. How would i make the enemy defend
    By Csm in forum OFP : MISSION EDITING & SCRIPTING
    Replies: 0
    Last Post: Jul 2 2002, 15:21

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •