Jump to content
Sign in to follow this  
kronzky

setFriend?

Recommended Posts

Has anybody gotten the command setFriend to work?

For me, it doesn't do anything...

I've tried with civilians as well as resistance units, setting the "friendship value" to 0 or 1, for either east or west, but nobody is ever attacked by anyone.

Here's a demo mission for easy testing: setfriend.zip

Share this post


Link to post
Share on other sites

I cannot imagine what that 'friendship' value is actually supposed to do huh.gif

Share this post


Link to post
Share on other sites

Did you call the command in the following way?

EAST setFriend[WEST,0.99]

I've used the command in the initializer of an unit of the east side and that unit doesn't fire on western soldiers any more.

Share this post


Link to post
Share on other sites

Huh, does that mean it changes how one whole side percieves another?

Maybe it's meant to make resistance swap sides in the middle of a mission? That would be handy for double agent type stuff.

Share this post


Link to post
Share on other sites
Huh, does that mean it changes how one whole side percieves another?

Maybe it's meant to make resistance swap sides in the middle of a mission? That would be handy for double agent type stuff.

I don't know the exact behavior, but I'm currently working on a prototype of a rescue mission, where the west side has to rescue some civilians.

In the beginning I want to simulate the neutrality between 'West' and the Resistance/EAST side.

So I've put the following in the init script:

//init Script

//set EAST friendly to WEST & vice versa in the beginning

east setfriend [west,0.99];

west setfriend [east,0.99];

and it semms to work smile_o.gif

Share this post


Link to post
Share on other sites

Well... After doing some more testing with Eastern and Western units, it seems that this command is at least pretty weirdly implemented - perhaps it's buggy, but I hesitate to call something buggy just because I might not understand it fully.

Here are the different scenarios I tried: (I used value 1 for "friendly", and 0 for "unfriendly")

* Civilians/resistance friendly to east: west will not attack.

* Civilians/resistance unfriendly to west: west will not attack.

* Civilians/resistance friendly to west: east will not attack.

* Civilians/resistance unfriendly to east: east will not attack.

* West friendly to east: east will not attack west, but west will <span style='color:red'>still</span> attack east.

* West friendly to east, and east friendly to west: nobody will attack anybody.

So, it seems the only thing you can do with this command is to keep one side from attacking the other, but you cannot use it to make enemies out of neutral units.

But, even though this is a bit disappointing (and not what you would expect, going by the documentation), I guess that's how it's supposed to be: I just tested the equivalent in VBS, and it did show the same kind of behavior. So either parts of the ArmA engine were ported from VBS, bugs and all, or this is indeed how it's supposed to act (in which case the documentation would be wrong - because nobody ever becomes an enemy).

Share this post


Link to post
Share on other sites

If you need the civilians to be considered hostile towards east&weast, then you have to make a old trick:

Make resistance hostile towards weat and east (aka "none" in weather menu), then make a civilian-group but add a resistance guy (with 0% probapility of presence) to lead that group. But if i remeber right you have to make that in start of the mission. If you join reistance and civilian in middle of mission, then civilians aren't considered to be hostile, but civilians offcourse shoot west&east on sight. Setpos-command might be ideal to switch places with non-hostile civilians and hostile civilians if you wan't middle of mission-event... Bit tricky but i can't figure out other way

Infact setfriendly thing partially works with civilians... West and east consideres them to be hostile, but for some reason they don't shoot them. They target them, they report them to be hostile (if i remeber right they used word "enemy civilian at 12 o'clock" at one of my playtests and they tracked me (the goody-goody civilian with loaded AK) with their guns), but the last thing: squeesing the trigger just doesn't work?

Share this post


Link to post
Share on other sites
Guest

Curious, u guys confirmed this only works at mission start -in init. or initialization feilds? Or does this continue to work any time during the mission i.e. - some cercumstance occurs, and can change freindly status then?

Share this post


Link to post
Share on other sites
Curious, u guys confirmed this only works at mission start -in init. or initialization feilds? Or does this continue to work any time during the mission i.e. - some cercumstance occurs, and can change freindly status then?

easy just trigger a script with those properties any time in the mission.

Share this post


Link to post
Share on other sites
Guest

gotcha, sounds like it does allow switching setFreind status at any time then.

Share this post


Link to post
Share on other sites

I'm wanting to use this in a mission where at the start you have guards on both sides of the border at Corozol.

I'm wanting all holy hell to break lose if either an Eastern or Western unit enter the "dead zone" between the two sides (the destroyed strip between the two sides of the town).

How would I set up a trigger to reset red and blue back to hostile again? Do I just copy the lines from the script Hawk outlined above into the trigger and set the values to 0? Or should I set the trigger to stop the script to reset the hostility level back to default? And if that's the way to go how should I go about doing it?

Share this post


Link to post
Share on other sites

This is made to compliment the editor option where you choose who RACS/Resistance are friendly to. In this case you can use other sides and change friendships anytime you want in a mission.

Sounds good to me smile_o.gif .

Share this post


Link to post
Share on other sites
So, it seems the only thing you can do with this command is to keep one side from attacking the other, but you cannot use it to make enemies out of neutral units.

Is this bug fixed?

I want to create an MP Mission where West and Resistance are fighting eachother (at the end of the mission)

will this command work properly now? band.gif

Share this post


Link to post
Share on other sites

im making a mission where Two different fractions are meeting, boom a car bomb goes off and kills the leaders, the units of the two different fractions come in and start shooting each other.

i used

Resistance setFriend [East, 0]

and they did start to shoot at each other, im using the 1.07 beta so it appears to have been fixed so far anyway ill continue to have a tinker tho. wanna make the civillians get shot too:D

Share this post


Link to post
Share on other sites

It was never broken, not entirely at least. It did work, units of one side would fire on units of the other, but the problem was that if the units already knew about the enemy units before their sides were set hostile to eachother they would not fire. They would only fire on units they spotted after the command was used.

So you have to determine if you actually saw units firing on known units after the command was used, and not just newly spotted units.

Share this post


Link to post
Share on other sites

Another negative aspect of the command is that most empty objects are on civillian side. Once you switch setFriend of civillians so that they get hostile to other factions all empty objects are attacked whistle.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×