Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: SetCaptive true not always working

  1. #1
    Hi !

    Just running into a problem while making a mission.
    I have an east officer imprisoned in a Resistance camp.
    I have civillians who more or less switch their loyalities multiple times in the mission. No problem so far. All working nice.
    The problem starts when I use
    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">civilian setFriend &#91;resistance, 0&#93;; resistance setfriend &#91;civilian, 0&#93;[/QUOTE]
    when a civillian attack on the camp is about to begin.
    As civillians have to attack the resistance side and resistance side is supposed to shoot back there is no easier way then that.

    But, as the east officer is set to civillian side aswell by the setcaptive true command he instantly gets shot upon by resistance guards. First i was like : Huh ?
    But it makes sense if you think about it.
    Anyway, it´s a serious problem for me though as I cant use
    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">east setFriend &#91;resistance, 1&#93;; resistance setfriend &#91;east, 1&#93;[/QUOTE]
    as the player´s role is on the east side and he should be attacked by resistance also.
    See the dilemma ?
    How do I make the eastern prisoner appear freindly to the Resistance side ?
    Editing the mission.sqm is out of question as the prisoner is supposed to follow the east player in one part of the mission.
    As setcaptive fails because of the civillian argument I am running out of options.

    Any ideas ?




  2. #2
    Sounds confusing, in fact i need to reread that. Just a sec..



    Ok
    Option 1:
    - Group Your East Man With a Civilian, Make the Civilian The Leader and set the civilians presence to 0. This should make the East Officer a civilian.

    Option 2:
    - I have no clue let me think some more...




    MattXR ( MxR )

    Check out my Twitter BIS Fans and Sub!
    -- MRKCCO Twitter --


  3. #3
    Bavarian Battlesmurf Balschoiw's Avatar
    Join Date
    Jan 15 2002
    Posts
    6,856
    Author of the Thread
    I guess engine-internal the russian officer with setcaptive true is already handled as a civillian. That´s why he gets mowed down once I set the friendship from Resistance to Civillians on a very bad level.
    What is also interesting is that empty objects like barrels and car wrecks are getting attacked by resistance once I set the setFriend of civillians and resistance on a bad level.
    So either I´m doing something wrong with the values, or the game engine does not distinguish between side "empty" and side "civillian" in some aspects. The funny thing is that resistance does not attack all empty objects. For example they don´t attack empty cars, tents, etc, but carwrecks, barrels and stuff like that.
    Really weird.

  4. #4
    Interesting observation,
    there is no side "empty" btw, empty vehicles are always considered
    "civilian". There must be still a different "flag" to them, because AI keeps firing at abandoned vehicles although they are officially "civilian".
    Setcaptive and setfriend don&#39;t seem to get along with each other too well. If i remember correctly setcaptive does NOT actually change the side of the unit (check with command :side unit),
    but i might be wrong
    Current project: TroopMon V0.8

  5. #5
    Bavarian Battlesmurf Balschoiw's Avatar
    Join Date
    Jan 15 2002
    Posts
    6,856
    Author of the Thread
    Well the really bad thing is that it blows my almost finished mission somewhere near the dustbin if I can´t find a working solution
    A ChangeSide command would do wonders if there was one implemented.
    Another observation. Changing setFriend values during a mission does not always work. Sometimes the AI simply does not react on the command and stay with it´s preset relation.
    Will investigate further.

    Btw, what happens if I first group the captive to a resistance guy ? This should make him a friendly first, right ? So can I group him with another side later on to switch his side, or is that impossible ?
    What happens if I group him to a Game-logic. What side are they ?
    I know those questions are pretty specific but I am looking for a solution really badly.

  6. #6
    As far as I am aware, it is currently impossible to change the actual side of a unit under any circumstances (once the mission starts that is).

    Unless someone knows something I don&#39;t? ***

    In any event, this feature would come in really handy. ***Image a population of civs that start off on the civilian side, but join one side or the other depending on how things are going. ***(i.e. Whether East or West has killed more civs acidentally, or perhaps you could also have a sub mission where you incite a riot, etc.)

    Currently you could script all this but it would involve swapping the units out (delete and then replace them with a new unit on another side, probably inside buildings or vehicles), and thus would get pretty messy.

    A setUnitSide command would be just what the doctor ordered. ***

    Now I just had an idea - Has anyone ever tried to join a unit from one side into a group that belongs to another side? ***I doubt this works, but I&#39;m going to try it tonight&#33;




  7. #7
    Master Gunnery Sergeant
    Join Date
    Dec 18 2005
    Location
    Adelaide, Australia
    Posts
    1,306
    Many non-unit objects that are not east, west, or resistance are civilian. eg empty vehicles, dead bodies, buildings. You should try to avoid having to use setFriend [civilian, 0]. Civilians are not meant to be enemy to anyone. By default, civilians share the same enemies as the resistance, and setting these two sides as enemy&#39;s might cause some unexpected results.

    Try to work out another solution based on the 3 combat teams, such as putting all resistance units on the west side instead. It is possible to place/add any unit class on any side, and the actual side a unit is on is completely transparent to the player.



    [self-promotion]
    OFP:R Island : Rezina
    [/self-promotion]

  8. #8
    Bavarian Battlesmurf Balschoiw's Avatar
    Join Date
    Jan 15 2002
    Posts
    6,856
    Author of the Thread
    Ok crumbled back to the old OFP way of using a dummy east units with a probability of 0 grouped with my civillian fighters. This way it works for the attack team. No flaws there.
    But still changing side loyalities really needs a look from BIS as it does not allways work. I used some repeated radio triggers in a test to switch their loyality from friendly to east to unfriendly to east. In about 20 percent of the switches the civillians didn´t switch their loyality factor. Maybe something in their AI pattern is hindering them from time to time. Don´t know.
    The workaround will do for this mission but it´s so old fashioned

    Quote Originally Posted by [b
    Quote[/b] ]By default, civilians share the same enemies as the resistance, and setting these two sides as enemy&#39;s might cause some unexpected results.
    The civillians didn´t cause that much trouble. It was the resistance side set enemy to civillians that started to go frenzy over empty objects. Quite insane. They kept shooting car wrecks and as wrecks are already wrecks they wasted all their AT´s and mg´s and tank power on one daihatsu wreck
    I was like: Good god, hold it &#33; It´s dead &#33;&#33;

    Anyway the mission is evolving again and I hope I don´t run into more trouble.


    Quote Originally Posted by [b
    Quote[/b] ]A setUnitSide command would be just what the doctor ordered.
    Agreed. Something for the wishlist ?

    Quote Originally Posted by [b
    Quote[/b] ]Has anyone ever tried to join a unit from one side into a group that belongs to another side?
    I just grouped one of east to the civis to make them east. Used probability of 0 to not have the unit on the map but the grouped civis still act like they are russian agitators




  9. #9
    Put the civillians on an different side then. Civillian side is special so you shouldn&#39;t change it with setFriend, put the civillian combatants on west side or something.
    VBS2 Designer

    Quote Originally Posted by Armored_Sheep View Post
    I like to call Arma a sandbox game that works pretty much like LEGO - you buy it not just because you want to have a nice car from the main picture on its box, do you?

  10. #10
    In OFP, when I grouped units to squads of other sides [during runtime], I had horridly bad results. Like, west fires on east, but east doesnt shoot back, etc..

    I cannot test if it is the same in ArmA.




Page 1 of 2 12 LastLast

Posting Permissions

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