Jump to content

Recommended Posts

Works beautifully!!

Even with Takistany civis.....

 

NOW...there's a way to spawn number of civis on the streets according to night/day?

It take a bit away from immersion that there's the same number of peoples in the streets at 3 AM than the ones at noon.

It would be cool if the ratio in house/streets changes according to daylight. Just trowing it out there.... :D

Share this post


Link to post
Share on other sites

Enigma,

 

Any way you could release the patrol script on armaholic, as I don't use the script editor?

 

Thanks for the great civ script.

Well, maybe it should work. I have not tested it with other units than civilians, but if you look in Engima\Civilians\Init.sqf you find some variables that can be tweaked. There is one for side and two for skill, so maybe it will be that easy. However, these will be one unit in each group (if you don't add more using the spawn callback), and their combat behaviour will be quite Arma 3 default.

I guess I have a script that would be better for you. It is called Engima.PatrolledAreas and is a little more on the subject. It is not released on Armaholic though, but you can get it if you download it with the TypeSqf editor. Here is the editor and here is the script

  • Like 1

Share this post


Link to post
Share on other sites

Excellent script!

 

Curious about two things.

 

Currently, alot of the buildings in Georgetown (Tanoa) are not enter able, and i believe this prevents civs from spawning in the city itself. Any thoughts on how to resolve that potential issue?

 

And 

 

Is there a way to add a specific vest or items to all civs spawned?

 

Danke ahead of time.

Share this post


Link to post
Share on other sites

Excellent script!

 

Curious about two things.

 

Currently, alot of the buildings in Georgetown (Tanoa) are not enter able, and i believe this prevents civs from spawning in the city itself. Any thoughts on how to resolve that potential issue?

 

And 

 

Is there a way to add a specific vest or items to all civs spawned?

 

Danke ahead of time.

 

What?! Has Bohemia created a map with unenterable buildings? I assumed that was only in the past...

 

There is a way to dress the civs. You can use the spawn callback to run whatever code you want when the civ spawnes. Look at Tiberius's post above. He's runs addAction on civs when they respawn.

Share this post


Link to post
Share on other sites

Hi Enigma! Thank you for this wonderful script. Is there a way for civilians to be in groups (like 10 civilians in one group), and yet individually they still go about in their own different paths, and would this actually help improve performance?

Share this post


Link to post
Share on other sites

Glad you like it! I don't know if it will affect performance very much. But it would save groups, since they canno be too many. Actually that was my first approach, but I gave it up because of civs behavior in groups. I could not control them as I desired. It is possible to set a max groups count if you need to limit scrip's number of groups used.

Share this post


Link to post
Share on other sites

I was wondering because TPW has a "Crowds" feature in his mod (SP only though).

 

https://forums.bistudio.com/topic/154944-tpw-mods-v20161008-enhanced-realism-and-immersion-for-arma-3-sp/page-179#entry3054310

 

https://dl.dropboxusercontent.com/u/481663/docs/crowd.txt

 

 

But anyway, im not saying that your script is lacking or anything :p Its great and does all that i need really. And most importantly it works in a dedicated server.

Share this post


Link to post
Share on other sites

Not tested, but if you change the "UNIT CLASSES" in the ConfigAndStarts.sqf you should be able to use other civis...like the ones from any Taliban-middle eastern-Takistan popular mods.....shouldn't it?

That is correct.

Share this post


Link to post
Share on other sites

how correct is your text editor? 

 

i get errors for Private variable '_Unit' not declared

 

but in my script i use _Unit = param [0];

 

So do i need to use

Private ["_Unit"];

_Unit = param [0];

 

there are a few more error types like syntax , ive used ' instead of ".

with the param [0];  is same as this select 0;

but if i put _Unit addEventHandler ['Respawn',{_this select 0 execVM

i get 0 cannot be used as a target for assignment.

 

so should _Unit addEventHandler ['Respawn',{_this select 0 execVM

be done like this

_Unit addEventHandler ['Respawn', { params []{  execVM

 

thanks, hope this isnt too of a noob question.

Share this post


Link to post
Share on other sites

how correct is your text editor?

Hi dr death jm!

Your question was in the wrong thread, so I answered it in the correct one.

Share this post


Link to post
Share on other sites

Good day! Explain the example please, how to create an area which will not appear civilians? Thank you for your detailed reply.

Share this post


Link to post
Share on other sites

Create a rectangle marker over the area you want blacklisted, name it, and add the name(s) of your blacklist marker(s) to the array located in the configurations script file:

private["_parameters"];
_parameters=[
["UNIT_CLASSES",["C_man_1"]],
["UNITS_PER_BUILDING",0.1],
["MAX_GROUPS_COUNT",12],
["MIN_SPAWN_DISTANCE",300],
["MAX_SPAWN_DISTANCE",700],
["BLACKLIST_MARKERS",["myBlacklistMarkerName1","myBlacklistMarkerName2","myBlacklistMarkerName3"]],
["HIDE_BLACKLIST_MARKERS",true],
["ON_UNIT_SPAWNED_CALLBACK",{}],
["ON_UNIT_REMOVE_CALLBACK",{true}],
["DEBUG",false]];
  • Like 1

Share this post


Link to post
Share on other sites

Hi, I'm trying to make a mission where if you kill,let's say, more than 3 civilian mission fails.I try different things and EH, but all seam to work on already spawned civis. Any kind soul willing to put down a piece of code for this noob here?

Thank you!!

Share this post


Link to post
Share on other sites
Quote

Add a Killed EH to them in the Description under CaManBase.

No need to do that here.

The Enigmas Civilian  framework has already an option for that in ConfigAndStart.sqf:

 

["ON_UNIT_SPAWNED_CALLBACK", {_this call fnc_addcivEh}],

Look at first post

  • Like 2

Share this post


Link to post
Share on other sites
On 3/1/2017 at 5:15 PM, davidoss said:

No need to do that here.

The Enigmas Civilian  framework has already an option for that in ConfigAndStart.sqf:

 


["ON_UNIT_SPAWNED_CALLBACK", {_this call fnc_addcivEh}],

Look at first post

Ok...I can't seam to get ahead of this, probably because dunno shait about scripts...

I found this, wich works on COS spawned civis, but not on engima's one. Why?

Spoiler

if (isServer) then
{
	FNH_civilians_killed = 0;
	addMissionEventHandler ["EntityKilled", 
	{
		_killed = _this select 0;
		if (side group _killed == civilian) then
		{
			FNH_civilians_killed = FNH_civilians_killed + 1;
			if (FNH_civilians_killed > 3) then
			{
				endMission "LOSER"; //or any other ending
			};
		};
	}];
};

 

I put this in the "init.sqf" of the mission...

 

 

 

EDIT: maybe like this?

 

this on the "ON_UNIT_SPAWNED_CALLBACK"

(_this select 0) addEventHandler ["killed", {_this exec "playerKilled.sqs"}]

and this in the "playerKilled.sqs"

Spoiler

if (isServer) then
{
    FNH_civilians_killed = 0;
    addMissionEventHandler ["EntityKilled", 
    {
        _killed = _this select 0;
        if (side group _killed == civilian) then
        {
            FNH_civilians_killed = FNH_civilians_killed + 1;
            if (FNH_civilians_killed > 3) then
            {
                endMission "LOSER"; //or any other ending
            };
        };
    }];
};

 

Share this post


Link to post
Share on other sites

Awesome script!  I'm not using it and simple traffic in my missions!  Thanks Enigma!!

 

Do you know if the 64-bit ArmA going to break the script?  

Edited by kman_(kya)
Ask about 64-bit ArmA

Share this post


Link to post
Share on other sites

Great script works quite well. I got 2 questions to ask please.

 

1. Would your mod in anyway make civilians hostile to blufor? I'm not sure if one of my scripts is interfering with it but if I disable your script before mission start my placed civilians aren't hostile but with your script they are. Now this is why I think I got a conflict because if I disable your script after I have started the mission, in the editor, it doesn't stop civilians shooting me. I'm talking about civilians I have placed in the editor.

 

2. To help me debug my problem in question one I was wondering how I could give the civilians weapons. I use ravage mod and have a command to give random loadouts if I put it into any init of a placed unit or module. With your script where would be the best place to put it? Reading an above post would putting it in here ["ON_UNIT_SPAWNED_CALLBACK", {}], be the best place for it or not?

 

Thank you for the great script.

Share this post


Link to post
Share on other sites

1. I have no idea. 

2. Yes, the spawn callback would be the best place to give them weapons.

  • Like 1

Share this post


Link to post
Share on other sites

Hey Engima,

 

I'm using this script to spawn in zombies instead of civs, and it's actually working just as I want it to, but I am confused as to what this line does. Are those "civ types" or what exactly? And how can they be used to spawn let's say "Zombie types" and so on.

 

a02743f684.png

 

Thanks in advance!

MrCrazyDude115,

 

Share this post


Link to post
Share on other sites
On 16/04/2017 at 0:57 AM, MrCrazyDude115 said:

Hey Engima,

 

I'm using this script to spawn in zombies instead of civs, and it's actually working just as I want it to, but I am confused as to what this line does. Are those "civ types" or what exactly? And how can they be used to spawn let's say "Zombie types" and so on.

 

a02743f684.png

 

Thanks in advance!

MrCrazyDude115,

 

 

I was having a play with this the other day but with opfor not zombies. All I did was change the unit class name and the faction, I think, class. 

 

The zombie animation should be part of there class name and I'm pretty sure that part you quoted if just how they behave once spawned. As in in doors or out side spawning. 

 

I don't 100% know but it's just a thought. 

 

Also awesome script specially if ya want random roaming enemy

  • Like 1

Share this post


Link to post
Share on other sites
15 hours ago, Chris Smith said:

 

I was having a play with this the other day but with opfor not zombies. All I did was change the unit class name and the faction, I think, class. 

 

The zombie animation should be part of there class name and I'm pretty sure that part you quoted if just how they behave once spawned. As in in doors or out side spawning. 

 

I don't 100% know but it's just a thought. 

 

Also awesome script specially if ya want random roaming enemy

 

:icon_dj:

Share this post


Link to post
Share on other sites

Having trouble with blacklist markers.

Civilians spawn as expected, but the markers for blacklisted areas don't hide on a dedi.

["UNIT_CLASSES", ["LOP_Tak_Civ_Man_01", "LOP_Tak_Civ_Man_02", "LOP_Tak_Civ_Man_03", "LOP_Tak_Civ_Man_04", "LOP_Tak_Civ_Man_05", "LOP_Tak_Civ_Man_06", "LOP_Tak_Civ_Man_07", "LOP_Tak_Civ_Man_08", "LOP_Tak_Civ_Man_09", "LOP_Tak_Civ_Man_10", "LOP_Tak_Civ_Man_11", "LOP_Tak_Civ_Man_12", "LOP_Tak_Civ_Man_13", "LOP_Tak_Civ_Man_14", "LOP_Tak_Civ_Man_15", "LOP_Tak_Civ_Random"]],
	["UNITS_PER_BUILDING", 0.1],
	["MAX_GROUPS_COUNT", 100],
	["MIN_SPAWN_DISTANCE", 50],
	["MAX_SPAWN_DISTANCE", 500],
	["BLACKLIST_MARKERS", ["markerNociv", "markerNociv_1"]],
	["HIDE_BLACKLIST_MARKERS", true],
	["ON_UNIT_SPAWNED_CALLBACK", {}],
	["ON_UNIT_REMOVE_CALLBACK", { true }],
	["DEBUG", false]

I've double-checked the variable names of the markers and they match. Perhaps I should just reduce the alpha on the markers because I think they still work?

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

×