Jump to content
Sign in to follow this  
alleycat

ALICE and hostile armed civilians?

Recommended Posts

I was looking at the BIKi for ALICE and I tried setting a very high angriness coeff. paired with giving the civilians guns (like the example does with Mk48). However I copied the exact code from it intio the module and they wont spawn with guns.

Basically I am trying to have the civilians of a town turn hostile and attack the side that accidently shoots one.

Share this post


Link to post
Share on other sites

The good news is that civs will automatically turn against a side that kills too many of them. All you need to do is arm them. Do you want them all to have the same weapon, or a random one?

The basic code is to set up an initialization for each civ to give them a weapon. It is something I integrated into my ambient traffic addon. :)

Share this post


Link to post
Share on other sites

same or random, both would be very useful. I am creating a set of missions where collateral damage does matter and this would add a lot. The arming code in the BIKI does not work if copied:

* ALICE_civilianinit = <array>; - array of codes which is executed upon every civilian unit created.

Example: [bIS_alice_mainscope,"ALICE_civilianinit",[{_this addweapon "Mk_48"}]] call bis_fnc_variablespaceadd;

(use function BIS_fnc_variablespaceadd to prevent replacing currently existing codes)

Default value: none

Share this post


Link to post
Share on other sites

Where are you putting the code, in the mission init, or the init line of the module itself?

I set up the ALICE init to trigger a script:

	[
	bis_alice_mainscope,
	"ALICE_civilianinit",
	[{
	[_this] execVM (JTD_ACTPath+"JTD_ambientCivTraffic.sqf");
	}]
	] call bis_fnc_variablespaceadd;

I guess to test it, something like this should work:

	[
	bis_alice_mainscope,
	"ALICE_civilianinit",
	[{
		_this addMagazine "8Rnd_9x18_Makarov"; _this addMagazine "8Rnd_9x18_Makarov"; _this addWeapon "Makarov";
	}]
	] call bis_fnc_variablespaceadd;

I think that would work best in the mission init. It would have to be different, I think, in the module init. That should give them 2 mags of 9x18, and the Mak. If you're interested in setting it up to call a script, post here, and we can work that out, too. ;)

Share this post


Link to post
Share on other sites

In your mission init.sqf, try to paste the code in my second code box. That might work. :)

Share this post


Link to post
Share on other sites

The only downside to having them spawn with weapons is how does one know if they are hostile or not. The ideal situation would be to have them get weapons after they turn hostile. Is that possible with the ALICE module or would you have to place each civilian individually?

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  

×