Jump to content
Sign in to follow this  
meatball

Civilian Crates?

Recommended Posts

Does anyone know of a way to allow players to get into ammo crates and such if they are set as enemies to Civilians?

For example, NATO player can get into NATO crates without a problem, but as soon as you do:

west setfriend [civilian,0];

NATO players can no longer get into NATO crates...

Share this post


Link to post
Share on other sites

west setfriend [civilian,0];

That is not a good idea, it can lead to all sorts of issues.

Better make individual units hostile by letting them join an enemy group (east or independent)

Share this post


Link to post
Share on other sites

Well, I've tried a bunch of different ways. The primary reason I did that was to allow players to get positive score on the MP scoreboard instead of negative if they take out someone in the civilian side. (They're all infected you see...)

I've tried making the civilian units renegades, but then everyone attacks them (including other civilians). Basically I want EAST, INDIE and CIVILIAN to not attack each other, but attack WEST. I want WEST to get penalized only for killing other WEST units, no others. I was running with this in my init.sqf:

east setfriend [independent,1];
east setfriend [civilian,1];
civilian setfriend [independent,1];
civilian setfriend [east,1];
independent setfriend [civilian,1];
independent setfriend [east,1];
west setfriend [civilian,0];
west setfriend [east,0];
west setfriend [independent,0];

Edited by Meatball

Share this post


Link to post
Share on other sites

Add killed eventhandlers to your civies which addRating to the killers, i.e. your squad. I don't remember how high the rating penalty is for a civie, maybe around 1000?

Share this post


Link to post
Share on other sites

So why don't you put your zombies on INDIE side then?

Share this post


Link to post
Share on other sites

Because to setup proper behavior/movement scripts for them I have to have each unit in it's own group. And with the 144 / side limit, I quickly run out of groups when players are scattered across the map. I've tried a few different setups to allow for enough units to be spawned, and the only way I've really gotten things working is to split the units between EAST, INDIE, and CIV and make them all friendly to each other.

Edited by Meatball

Share this post


Link to post
Share on other sites
Because to setup proper behavior/movement scripts for them I have to have each unit in it's own group. And with the 144 / side limit, I quickly run out of groups when players are scattered across the map. I've tried a few different setups to allow for enough units to be spawned, and the only way I've really gotten things working is to split the units between EAST, INDIE, and CIV and make them all friendly to each other.

Hey Meatball,

correct me if I'm wrong, but isn't sideEnemy a side on its own? You could probably use that for zombies, no idea how it will work out though because they might be hostile to each other.

Then there's still sideFriendly...

Share this post


Link to post
Share on other sites

@grumpy - I think you're talking about making the civvies 'renegades' by adjusting their rating. That covers the penalty for the negative score, but then _everyone_ will try to kill the renegade.

@Tajin - Excellent, I'll just add a similar eventHandler to the civilian units on creation. Thanks much for the direction!

Share this post


Link to post
Share on other sites

Digged out some code snippet I used in a similar situation.

_x addRating -10000;
_x addEventHandler ['killed', {(_this select 1) addRating 1000}];

The first command will make them hostile to everyone (themselves included), the second will protect their killers from becoming renegades.

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  

×