Jump to content
bangabob

Enemy occupation system (eos)

Recommended Posts

I'm not sure about that error, is it possible that you try to spawn a type of unit, which is not defined? Another issue I had, was that I tried to add more units intro the cargo than the vehicle had space for.

There shouldn't be a problem in adding a seperate script for AI behaviour and skill. However, I 've actually never tried that myself. Just test it out.

put in your init.sqf

[color="#FF8040"]
[color="#8B3E2F"][b][[/b][/color][color="#8B3E2F"][b]][/b][/color] [color="#191970"][b]execVM[/b][/color] [color="#7A7A7A"]"removeItemsFromClass.sqf"; //couldn't think of a better name[/color][color="#8B3E2F"][b][/b][/color][/color]

Made with KK's SQF to BBCode Converter

In that script you add:

[color="#FF8040"][color="#1874CD"]_unitPool[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"classname1"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"classname2"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"classname3"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"classname4"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"classname5"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];//add the classnames of the units you want to add items to[/b][/color]
[color="#191970"][b]while[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#000000"]true[/color][color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]do[/b][/color]
[color="#8B3E2F"][b]{[/b][/color]
[color="#8B3E2F"][b]{[/b][/color]
	[color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]side[/b][/color] [color="#000000"]_x[/color] [color="#8B3E2F"][b]=[/b][/color][color="#8B3E2F"][b]=[/b][/color] [color="#000000"]east[/color] [color="#8B3E2F"][b]&[/b][/color][color="#8B3E2F"][b]&[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]typeOf[/b][/color] [color="#000000"]_x[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]in[/b][/color] [color="#1874CD"]_unitPool[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color]
		[color="#000000"]_x[/color] [color="#191970"][b]addPrimaryWeaponItem[/b][/color] [color="#7A7A7A"]"acc_flashlight"[/color][color="#8B3E2F"][b];[/b][/color]
		[color="#000000"]_x[/color] [color="#191970"][b]assignItem[/b][/color] [color="#7A7A7A"]"acc_flashlight"[/color][color="#8B3E2F"][b];[/b][/color]
		[color="#000000"]_x[/color] [color="#191970"][b]enableGunLights[/b][/color] [color="#7A7A7A"]"AUTO"[/color][color="#8B3E2F"][b];[/b][/color]
	[color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color]
[color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]forEach[/b][/color] [color="#191970"][b]allUnits[/b][/color][color="#8B3E2F"][b];[/b][/color]  
[color="#191970"][b]sleep[/b][/color] [color="#FF0000"]20[/color][color="#8B3E2F"][b];[/b][/color] 
[color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color][/color]

Made with KK's SQF to BBCode Converter

I didn't test it, but I think it should work fine.

I will definitely try that after work. thanks for the heads up, I will also go back and double check the vehicle unit pools to make sure its correct.

http://forums.bistudio.com/showthread.php?179687-Random-House-Patrol-Script-by-Tophe

This is basically what I was going to try to implement. I see you are using SHK_patrol so I will try and review that and attempt to place the house patrol in as well. In short this is how you use it, you can modify it some with settings;

USAGE

Place unit close to a house and set init field to:

guard = [this] execVM "HousePatrol.sqf"

this one is most likely what I would use.

guard = [this,"SAFE",60, [], -1, true] execVM "HousePatrol.sqf"

Share this post


Link to post
Share on other sites

Instead of using a "clunky" loop you can add/remove item on each eos spawned units in eos\setSkill.sqf ( inside the "{...} forEach (units _grp);" array, using _unit as unit name )

To use the house patrol, go inside eos\core\eos_core.sqf and replace this line :

0=[_mPos,units _aGroup,_mkrX,0,[0,20],true,true] call shk_fnc_fillhouse;

By

0 = [units _aGroup,"SAFE",60, [], -1, true] execVM "HousePatrol.sqf";

EDIT :

I don't know if the HousPatrol script support an array of unit, if not use this instead :

0 = [leader _aGroup,"SAFE",60, [], -1, true] execVM "HousePatrol.sqf";

Edited by Cruoriss

Share this post


Link to post
Share on other sites
Instead of using a "clunky" loop you can add/remove item on each eos spawned units in eos\setSkill.sqf ( inside the "{...} forEach (units _grp);" array, using _unit as unit name )

To use the house patrol, go inside eos\core\eos_core.sqf and replace this line :

0=[_mPos,units _aGroup,_mkrX,0,[0,20],true,true] call shk_fnc_fillhouse;

By

0 = [units _aGroup,"SAFE",60, [], -1, true] execVM "HousePatrol.sqf";

EDIT :

I don't know if the HousPatrol script support an array of unit, if not use this instead :

0 = [leader _aGroup,"SAFE",60, [], -1, true] execVM "HousePatrol.sqf";

That's good to know. Thanks!

Share this post


Link to post
Share on other sites
Instead of using a "clunky" loop you can add/remove item on each eos spawned units in eos\setSkill.sqf ( inside the "{...} forEach (units _grp);" array, using _unit as unit name )

To use the house patrol, go inside eos\core\eos_core.sqf and replace this line :

0=[_mPos,units _aGroup,_mkrX,0,[0,20],true,true] call shk_fnc_fillhouse;

By

0 = [units _aGroup,"SAFE",60, [], -1, true] execVM "HousePatrol.sqf";

EDIT :

I don't know if the HousPatrol script support an array of unit, if not use this instead :

0 = [leader _aGroup,"SAFE",60, [], -1, true] execVM "HousePatrol.sqf";

thanks for the info guys!

1. I like the loop as it allows me to edit the specific units I want to have flashlights. However, looking at the setSkill.sqf its above my pay grade to add that code with success. I see the {...} and where it has ADD SPECIFIC SCRIPT HERE, but moving forward with something like that I would need more guidance. I am also uncertain doing that would allow me the specific units to have flashlights. I am not sure though.

2. I was unaware of the shk_fnc_fillhouse and that it was already incorporated in this addon. But I do not find that function in the fnc folder either. So does it exist somewhere else? May be I should just use that instead.

sry more basic level questions.

Share this post


Link to post
Share on other sites
thanks for the info guys!

1. I like the loop as it allows me to edit the specific units I want to have flashlights. However, looking at the setSkill.sqf its above my pay grade to add that code with success. I see the {...} and where it has ADD SPECIFIC SCRIPT HERE, but moving forward with something like that I would need more guidance. I am also uncertain doing that would allow me the specific units to have flashlights. I am not sure though.

2. I was unaware of the shk_fnc_fillhouse and that it was already incorporated in this addon. But I do not find that function in the fnc folder either. So does it exist somewhere else? May be I should just use that instead.

sry more basic level questions.

[color="#FF8040"][color="#1874CD"]_grp[/color][color="#8B3E2F"][b]=[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color]
[color="#1874CD"]_skillArray[/color][color="#8B3E2F"][b]=[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color]	
[color="#1874CD"]_unitPool[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"classname1"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"classname2"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"classname3"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"classname4"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"classname5"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color]				

[color="#1874CD"]_skillset[/color] [color="#8B3E2F"][b]=[/b][/color] server [color="#191970"][b]getVariable[/b][/color] [color="#1874CD"]_skillArray[/color][color="#8B3E2F"][b];[/b][/color]
[color="#8B3E2F"][b]{[/b][/color]
[color="#1874CD"]_unit[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]_x[/color][color="#8B3E2F"][b];[/b][/color]
[color="#8B3E2F"][b]{[/b][/color]
	[color="#1874CD"]_skillvalue[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_skillset[/color] [color="#191970"][b]select[/b][/color] [color="#000000"]_forEachIndex[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]+[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]random[/b][/color] [color="#FF0000"]0.2[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]-[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]random[/b][/color] [color="#FF0000"]0.2[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color]
	[color="#1874CD"]_unit[/color] [color="#191970"][b]setSkill[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#000000"]_x[/color][color="#8B3E2F"][b],[/b][/color][color="#1874CD"]_skillvalue[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color]
[color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]forEach[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]'aimingAccuracy'[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]'aimingShake'[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]'aimingSpeed'[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]'spotDistance'[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]'spotTime'[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]'courage'[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]'reloadSpeed'[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]'commanding'[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]'general'[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color]				
[color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color]EOS_DAMAGE_MULTIPLIER [color="#8B3E2F"][b]![/b][/color][color="#8B3E2F"][b]=[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#1874CD"]_unit[/color] [color="#191970"][b]removeAllEventHandlers[/b][/color] [color="#7A7A7A"]"HandleDamage"[/color][color="#8B3E2F"][b];[/b][/color][color="#1874CD"]_unit[/color] [color="#191970"][b]addEventHandler[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"HandleDamage"[/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b]{[/b][/color][color="#1874CD"]_damage[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]2[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b]*[/b][/color]EOS_DAMAGE_MULTIPLIER[color="#8B3E2F"][b];[/b][/color][color="#1874CD"]_damage[/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color]
[color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color]EOS_KILLCOUNTER[color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#1874CD"]_unit[/color] [color="#191970"][b]addEventHandler[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"killed"[/color][color="#8B3E2F"][b],[/b][/color] [color="#7A7A7A"]"null=[] execVM "[/color][color="#7A7A7A"]"eos\functions\EOS_KillCounter.sqf"[/color][color="#7A7A7A"]""[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color]

[color="#006400"][i]// ADD CUSTOM CODE			[/i][/color]
[color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]side[/b][/color] [color="#000000"]_x[/color] [color="#8B3E2F"][b]=[/b][/color][color="#8B3E2F"][b]=[/b][/color] [color="#000000"]east[/color] [color="#8B3E2F"][b]&[/b][/color][color="#8B3E2F"][b]&[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]typeOf[/b][/color] [color="#000000"]_x[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]in[/b][/color] [color="#1874CD"]_unitPool[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] 
[color="#8B3E2F"][b]{[/b][/color]
	[color="#000000"]_x[/color] [color="#191970"][b]addPrimaryWeaponItem[/b][/color] [color="#7A7A7A"]"acc_flashlight"[/color][color="#8B3E2F"][b];[/b][/color]
	[color="#000000"]_x[/color] [color="#191970"][b]assignItem[/b][/color] [color="#7A7A7A"]"acc_flashlight"[/color][color="#8B3E2F"][b];[/b][/color]
	[color="#000000"]_x[/color] [color="#191970"][b]enableGunLights[/b][/color] [color="#7A7A7A"]"AUTO"[/color][color="#8B3E2F"][b];[/b][/color]
[color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color]
[color="#006400"][i]// ADD CUSTOM CODE	[/i][/color]
[color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]forEach[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]units[/b][/color] [color="#1874CD"]_grp[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] 
[/color]

Made with KK's SQF to BBCode Converter

This should work and you can still declare what type of units should get the special gear in the _unitPool . (I hope I didn't do any mistake here,the structure of the code was kinda messy for my taste)

The shk_fnc_fillhouse is already been used, if you set the parameters of your zones correctly.

Edited by R3vo

Share this post


Link to post
Share on other sites
[color="#FF8040"][color="#1874CD"]_grp[/color][color="#8B3E2F"][b]=[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]0[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color]
[color="#1874CD"]_skillArray[/color][color="#8B3E2F"][b]=[/b][/color][color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color]	
[color="#1874CD"]_unitPool[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"classname1"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"classname2"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"classname3"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"classname4"[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]"classname5"[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color]				

[color="#1874CD"]_skillset[/color] [color="#8B3E2F"][b]=[/b][/color] server [color="#191970"][b]getVariable[/b][/color] [color="#1874CD"]_skillArray[/color][color="#8B3E2F"][b];[/b][/color]
[color="#8B3E2F"][b]{[/b][/color]
[color="#1874CD"]_unit[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#000000"]_x[/color][color="#8B3E2F"][b];[/b][/color]
[color="#8B3E2F"][b]{[/b][/color]
	[color="#1874CD"]_skillvalue[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#1874CD"]_skillset[/color] [color="#191970"][b]select[/b][/color] [color="#000000"]_forEachIndex[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]+[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]random[/b][/color] [color="#FF0000"]0.2[/color][color="#8B3E2F"][b])[/b][/color] [color="#8B3E2F"][b]-[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]random[/b][/color] [color="#FF0000"]0.2[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color]
	[color="#1874CD"]_unit[/color] [color="#191970"][b]setSkill[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#000000"]_x[/color][color="#8B3E2F"][b],[/b][/color][color="#1874CD"]_skillvalue[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color]
[color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]forEach[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]'aimingAccuracy'[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]'aimingShake'[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]'aimingSpeed'[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]'spotDistance'[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]'spotTime'[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]'courage'[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]'reloadSpeed'[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]'commanding'[/color][color="#8B3E2F"][b],[/b][/color][color="#7A7A7A"]'general'[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color]				
[color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color]EOS_DAMAGE_MULTIPLIER [color="#8B3E2F"][b]![/b][/color][color="#8B3E2F"][b]=[/b][/color] [color="#FF0000"]1[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#1874CD"]_unit[/color] [color="#191970"][b]removeAllEventHandlers[/b][/color] [color="#7A7A7A"]"HandleDamage"[/color][color="#8B3E2F"][b];[/b][/color][color="#1874CD"]_unit[/color] [color="#191970"][b]addEventHandler[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"HandleDamage"[/color][color="#8B3E2F"][b],[/b][/color][color="#8B3E2F"][b]{[/b][/color][color="#1874CD"]_damage[/color] [color="#8B3E2F"][b]=[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#000000"]_this[/color] [color="#191970"][b]select[/b][/color] [color="#FF0000"]2[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b]*[/b][/color]EOS_DAMAGE_MULTIPLIER[color="#8B3E2F"][b];[/b][/color][color="#1874CD"]_damage[/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b];[/b][/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color]
[color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color]EOS_KILLCOUNTER[color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] [color="#8B3E2F"][b]{[/b][/color][color="#1874CD"]_unit[/color] [color="#191970"][b]addEventHandler[/b][/color] [color="#8B3E2F"][b][[/b][/color][color="#7A7A7A"]"killed"[/color][color="#8B3E2F"][b],[/b][/color] [color="#7A7A7A"]"null=[] execVM "[/color][color="#7A7A7A"]"eos\functions\EOS_KillCounter.sqf"[/color][color="#7A7A7A"]""[/color][color="#8B3E2F"][b]][/b][/color][color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color]

[color="#006400"][i]// ADD CUSTOM CODE			[/i][/color]
[color="#191970"][b]if[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]side[/b][/color] [color="#000000"]_x[/color] [color="#8B3E2F"][b]=[/b][/color][color="#8B3E2F"][b]=[/b][/color] [color="#000000"]east[/color] [color="#8B3E2F"][b]&[/b][/color][color="#8B3E2F"][b]&[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]typeOf[/b][/color] [color="#000000"]_x[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]in[/b][/color] [color="#1874CD"]_unitPool[/color][color="#8B3E2F"][b])[/b][/color] [color="#191970"][b]then[/b][/color] 
[color="#8B3E2F"][b]{[/b][/color]
	[color="#000000"]_x[/color] [color="#191970"][b]addPrimaryWeaponItem[/b][/color] [color="#7A7A7A"]"acc_flashlight"[/color][color="#8B3E2F"][b];[/b][/color]
	[color="#000000"]_x[/color] [color="#191970"][b]assignItem[/b][/color] [color="#7A7A7A"]"acc_flashlight"[/color][color="#8B3E2F"][b];[/b][/color]
	[color="#000000"]_x[/color] [color="#191970"][b]enableGunLights[/b][/color] [color="#7A7A7A"]"AUTO"[/color][color="#8B3E2F"][b];[/b][/color]
[color="#8B3E2F"][b]}[/b][/color][color="#8B3E2F"][b];[/b][/color]
[color="#006400"][i]// ADD CUSTOM CODE	[/i][/color]
[color="#8B3E2F"][b]}[/b][/color] [color="#191970"][b]forEach[/b][/color] [color="#8B3E2F"][b]([/b][/color][color="#191970"][b]units[/b][/color] [color="#1874CD"]_grp[/color][color="#8B3E2F"][b])[/b][/color][color="#8B3E2F"][b];[/b][/color] 
[/color]

Made with KK's SQF to BBCode Converter

This should work and you can still declare what type of units should get the special gear in the _unitPool . (I hope I didn't do any mistake here,the structure of the code was kinda messy for my taste)

The shk_fnc_fillhouse is already been used, if you set the parameters of your zones correctly.

Hey thanks for your help!!

Share this post


Link to post
Share on other sites

hello sorry if the has been asked before and the information posted.

How can I get the OPFOR units not to despawn when the human players in the current zone are dead but still have Blufor AI units in that zone. I would like for the zones to be active until all blufor units are dead in the zone not only the human players. I am using DAPMAN\Scripts\Wounded units that works well with all AI units on the map. If a human squad leader and all the human players gets killed from that squad I don't want the zone to despawn until thete is no more blufor AI and or Human players in the zone are alive.

Can this be done for the EOS script. I looked but can't find the code to change. Thanks Avibird

Share this post


Link to post
Share on other sites

Hi,

Anyone else having issues since maybe the latest update 1:40, im unable to get Blufor to spawn any armour at all (this may have been before the patch) and Opfor groups seem to kill each other off when spawning, testing on Almyra, Altis with single 50X50 Marker. No mods/scripts/latest stable.

Also is there anyway to completely ignore or turn off the skill settings and go with game default, I couldn't find any switch for it.

Edited by Katipo66
Another question

Share this post


Link to post
Share on other sites

At the end of the script why does it ask for the side twice?

".....[1,2,500,WEST,FALSE]] call EOS_Spawn;"

where "1" is also west, and "WEST" is also west?

Share this post


Link to post
Share on other sites
At the end of the script why does it ask for the side twice?

".....[1,2,500,WEST,FALSE]] call EOS_Spawn;"

where "1" is also west, and "WEST" is also west?

I think one side is for the player's side, or at least the side that will activate the area, and the second is the side of the units that do get spawned. As for the 1 vs "WEST" I'm sure there is a reason for it in the backend.

Share this post


Link to post
Share on other sites
I think one side is for the player's side, or at least the side that will activate the area, and the second is the side of the units that do get spawned. As for the 1 vs "WEST" I'm sure there is a reason for it in the backend.

Thanks JShock. Man i need an answer on DAC forum too. Sorry to trouble you but can you have a look ? :(

Post #217

http://forums.bistudio.com/showthread.php?176926-DAC-V3-1-(Dynamic-AI-Creator)-released/page22

Thanks in advance mate. You have helped me several times in the past too :D

Share this post


Link to post
Share on other sites

The number is for the faction of a side.. i.e 1 = Nato - 4 = FIA etc

Share this post


Link to post
Share on other sites
The number is for the faction of a side.. i.e 1 = Nato - 4 = FIA etc

Yeah that makes sense. Numbers for faction, and Side for particular side like OPFOR or CAF Aggressors etc. Thanks

Share this post


Link to post
Share on other sites

is there any way to generate game logic with script in order to call fillhouse dynamically ?

my last try:

//_target -> string with the marker name
_targetObject = missionNamespace getVariable [_target, objNull];
_logicCenter = createCenter sideLogic;
_logicGroup = createGroup _logicCenter;
_target = _logicGroup createUnit ["Logic", (getPos _targetObject), [], 0, "NONE"];
nul = [_target,2,true,2,[10,20],100,[0.3,0.4,0.6,0.4,0.4,0.7,1,0.6,1,0.6],nil,nil,_id] execVM "LV\fillHouse.sqf";

with no success

Share this post


Link to post
Share on other sites

I think "logic" needs to be in all caps.

Share this post


Link to post
Share on other sites

The logic have been created... it's missionNamespace getVariable which don't work, it always returns objNull :mad:

10:21:03 "DEBUG#FH | LOGIC: L Charlie 2-1:1 - LPOS: [0.46875,0.46875,0] - TPOS: [0,0,0] - targetObject: <NULL-object> - target: cm_to_therisa"

i don't understand why missionNamespace getVariable ["cm_to_therisa", objNull] don't give me: cm_to_therisa

Share this post


Link to post
Share on other sites

Oh, ha, you need to create the logic before doing the get variable.

Share this post


Link to post
Share on other sites

You probably said that because i trans-typed _target... but _target is only my marker name (string) "cm_to_therisa"

In this case it's used to get the position for creating the logic.

cm_to_therisa is a marker placed in the editor and a simple test.sqf with missionNamespace getVariable ["cm_to_therisa", objNull] always returns objNull

I'm totally unable to get an object name from a string and this turn me mad.

EDIT

-------------------------------------------

problem solved with:

case "FH": {
	_logicCenter = createCenter sideLogic;
	_logicGroup = createGroup _logicCenter;
	_targetLogic = _logicGroup createUnit ["LOGIC", (getMarkerPos _target), [], 0, "NONE"];
	diag_log format["DEBUG#FH | LOGIC: %1 - LPOS: %2 - TPOS: %3 - target: %4",_targetLogic,(str getPos _targetLogic),(str getMarkerPos _target),_target];
	nul = [_targetLogic,2,true,2,[10,20],6,"default",nil,nil,_id] execVM "LV\fillHouse.sqf";
};

22:53:35 "DEBUG#FH | LOGIC: L Charlie 2-1:1 - LPOS: [16073.3,16995.1,0] - TPOS: [16073.3,16995.1,0] - target: cm_mi_telos"

But fillhouse units wont spawn !?

Edited by XoO

Share this post


Link to post
Share on other sites
Hi,

Anyone else having issues since maybe the latest update 1:40, im unable to get Blufor to spawn any armour at all (this may have been before the patch) and Opfor groups seem to kill each other off when spawning, testing on Almyra, Altis with single 50X50 Marker. No mods/scripts/latest stable.

Also is there anyway to completely ignore or turn off the skill settings and go with game default, I couldn't find any switch for it.

Is anybody else having this issue?

Share this post


Link to post
Share on other sites
Is anybody else having this issue?

tested on A3 vanilla:

nul = [_target,1,150,[true,false],[true,false,false],false,[10,0],[10,0],"default",nil,nil,_id] execVM "LV\militarize.sqf";

armor spawned: Slammer, Panther, Cheetah, Marshall

Share this post


Link to post
Share on other sites

Having some serious issues right now.

I have used EOS forever so I have the basics like a logic and such down.

However, I can't seem to get the spawn range to work, nothing will spawn unless I'm on the marker itself. I have a spawn distance of 444 but still nothing.

Is anyone else noticing this ?

Share this post


Link to post
Share on other sites

Does EOS has the ability to let spawned units patrol in more than 1 marker plpaced separately on the map? Just like DAC handles through Zone ID? If yes, then how? Thank you. :D

Share this post


Link to post
Share on other sites
tested on A3 vanilla:

nul = [_target,1,150,[true,false],[true,false,false],false,[10,0],[10,0],"default",nil,nil,_id] execVM "LV\militarize.sqf";

armor spawned: Slammer, Panther, Cheetah, Marshall

Isnt that calling Spunfins scripts?

I have downloaded the latest version again and still cannot get any armour for east or west to spawn using

null = [["EOS"],[0,0],[2,2],[1,1],[1,1],[0],[0,0],[1,0,350,WEST,TRUE]] call EOS_Spawn;

dont have that problem that Opfor groups seem to kill

I realized i changed side but not faction :)

Share this post


Link to post
Share on other sites

New problem since the last patch: House patrols spawn at the correct distance but once you get to the centre of the marker they cache, and then restore once you move away from the centre, then cache when you move back to it etc. etc.

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

×