Jump to content
Sign in to follow this  
BlackAlpha

Spawned Resistance Does Not Attack West

Recommended Posts

I'm trying to spawn resistance units who are hostile towards everybody (east and west). I've set the Resistance on "friendly to nobody" in the mission. This is the script I'm using:

(position, side, number of units)

[_pos, resistance, ((random 9) + 5)] call BIS_fnc_spawnGroup

Problem is that the resistance does not want to attack west units, even when under attack or when you "teamkill" them. They attack Russians, they attack me when I'm a civie and I start shooting them. They do not however attack west units and they don't even bother to defend themselves when I'm a west unit and I start shooting them at point blank range.

Weird thing is that they just say "hello" when west units are near them and I can even talk to them. Other west units just instantly shoot them but the resistance guys don't even go into an alert state. When I call them in I call them "Enemy man".

So, why do they refuse to attack west units?

Edited by BlackAlpha

Share this post


Link to post
Share on other sites

probably because the side has no HQ. Either place a resistance unit in the editor (works also if you set it's presence-probability to zero) or have a look at createCenter

Share this post


Link to post
Share on other sites

Awesome, mate! It worked. To be on the safe side, I placed 1 west, 1 east, 1 guer and 1 civie with 0 probability.

Share this post


Link to post
Share on other sites
probably because the side has no HQ. Either place a resistance unit in the editor (works also if you set it's presence-probability to zero) or have a look at createCenter

So for any mission wich dosent have certain editor placed sides (units) it's as simple as running the code in the init.sqf?? Even if the spawned units can be a totally random side?

init.sqf

_SideHQ = createCenter East;
_SideHQ = createCenter West;
_SideHQ = createCenter resistance;

Share this post


Link to post
Share on other sites

Easier to just put down a unit off in a corner for whatever sides you want and set their Probability of Presence to 0%. They won't actually 'be there' but they'll create centers for all their factions.

Share this post


Link to post
Share on other sites

just to let you know - found that AI opfur don't attack, as you have described, if you use the first aid modules in multiplayer.

Share this post


Link to post
Share on other sites
Easier to just put down a unit off in a corner for whatever sides you want and set their Probability of Presence to 0%. They won't actually 'be there' but they'll create centers for all their factions.

yes much simpler I agree. Iam making a randomized 'hunter' template for someone, and I wanted to make it more user friendly to convert over to diffrent maps, without having to copy and paste the 0% pop units everytime.

Though asking someone to make sure there are editor placed units before hand isnt asking for much :yay:

PS, can I use the same handle >>

_sideHQ

<< for each of the create center commands if I wanted to create center for multiple sides in the init?

Share this post


Link to post
Share on other sites

PS, can I use the same handle >>

_sideHQ

<< for each of the create center commands if I wanted to create center for multiple sides in the init?

I dont think so, since the variable stores that particular side, once you use it for a new side, the old one is overwritten (unless the engine moves it into a temporary container, much like how sides are auto created when a unit is placed on the map)

Share this post


Link to post
Share on other sites
I dont think so, since the variable stores that particular side, once you use it for a new side, the old one is overwritten (unless the engine moves it into a temporary container, much like how sides are auto created when a unit is placed on the map)

thanks

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  

×