Jump to content

Recommended Posts

Is there a way to make it work with custom faction ?

Like ambiant combat with middle east agaisnt blufor ?

Share this post


Link to post
Share on other sites
I'm new to the ARMA editing community and so I'm wondering: if I release a mission on the workshop that utilized scripts from a release is it just a case of giving credit and linking to the release?

Yes that's the case, if you feel like it. :) Usually mission makers gives credit, but I've never required it.

Is there a way to make it work with custom faction ?

Like ambiant combat with middle east agaisnt blufor ?

It's possible, but you would have to edit the scripts a bit to add new classnames. For example for ambientCombat; in "LV\LV_functions\LV_fnc_menGroup.sqf" you can find arrays "_OPFmen" and "_OPFmen2". These 2 arrays holds classnames for east side units ambientCombat uses, so replace those classnames or add other classnames among those to get new units appear.

Share this post


Link to post
Share on other sites

Spunfin,any chance you had a look at the heli paradrop?

On another note im just wondering if your planning to keep the mod updated over the next few months.Im making alot of missions rite now using your script and would hope it does notend up making all my missions redundant after a future update from BIS.

Ambient combat is a centre peice of my missions,couldnt imagine living without it :) Just hoping bis dosent screw it up because of an update.

Share this post


Link to post
Share on other sites

Going to start testing,, this one looks like a great concept.

Can more then one script be issued from one game logic ?

Or can multiple game logics be launched in one mission ?

Edited by 3lockad3

Share this post


Link to post
Share on other sites

Just for future reference you can actually have down more then one game logic in a mission.

I'm testing a couple of the features issued in this pack and it works,, I'm just not sure how stable it is.

Share this post


Link to post
Share on other sites
Spunfin,any chance you had a look at the heli paradrop?

On another note im just wondering if your planning to keep the mod updated over the next few months.Im making alot of missions rite now using your script and would hope it does notend up making all my missions redundant after a future update from BIS.

Ambient combat is a centre peice of my missions,couldnt imagine living without it :) Just hoping bis dosent screw it up because of an update.

Hey redarmy o/

Unfortunately I havent found your issue yet, but I'll take a look tomorrow when it's finally free day for me. :) And yes I'll try to keep things updated if BIS makes some script breaking changes, but let's hope they dont.

Going to start testing,, this one looks like a great concept.

Can more then one script be issued from one game logic ?

Or can multiple game logics be launched in one mission ?

Yes you can run multiple instances from single init line, or, use multiple game logics. Just avoid using identical ID -parameters if you need to use them, otherwise there will be some issues. Also, if you use fillHouse & militarize in large scale, you should consider checking out simpleCacheV2 by Na_Palm to avoid performance issues.

Share this post


Link to post
Share on other sites

If You Are Worried about Stability or want to max the FPS, You Can Use deletevehicle Marker Or Gaimlogic Name; on the Init field of a trigger for a Condition. Example

Trigger

Conditions

(({alive _x} count (units LVgroup66)) == 0)

Init

call compile format["LV_grpname = LVgroup%1",22]; nul = [LV_grpname]; hint "all Unit's Are Dead" deletevehicle marker_LZ; deletevehicle Gamelogic_21;

Share this post


Link to post
Share on other sites

[code=Yes you can run multiple instances from single init line, or, use multiple game logics. Just avoid using identical ID -parameters if you need to use them, otherwise there will be some issues. Also, if you use fillHouse & militarize in large scale, you should consider checking out simpleCacheV2 by Na_Palm to avoid performance issues.

Yes,, I did some testing and figured that out, I also did a lot of testing with the simple caching. Just trying to find some good tweaks in the numbers now.

Using item's inits to populate towns, to avoid nasty markers :D

I don't know why I wasn't using this before now... What an awesome script.

---------- Post added at 00:41 ---------- Previous post was at 00:38 ----------

If You Are Worried about Stability or want to max the FPS, You Can Use deletevehicle Marker Or Gaimlogic Name; on the Init field of a trigger for a Condition. Example

Trigger

Conditions

(({alive _x} count (units LVgroup66)) == 0)

Init

call compile format["LV_grpname = LVgroup%1",22]; nul = [LV_grpname]; hint "all Unit's Are Dead" deletevehicle marker_LZ; deletevehicle Gamelogic_21;

Okay, I'll try that.

Thanks!

Share this post


Link to post
Share on other sites

Great work on this spunFIN. So i got your ambient ai script to work on a local listen server, but i got stuck on the spawning/client initialize screen, however after hitting esc and getting to the menu and choosing re-spawn everything worked great. At this point i decided to copy all the files inside of the LV and LV_functions folders to the proper directory on my hfb dedicated wasteland server. This included the working init file with the call statement i received from the assip app. I did all of this with the server stopped. i then restarted the server, let it completely load and then restarted it again just to make sure. After logging into the server and playing for over 10 mins never saw any ambient ai. Anyone think they can help me out? i'm sure i just missed something small and stupid, but i've been banging my head on a wall trying to get this to work.

Share this post


Link to post
Share on other sites

Question, Have you populated the marker's or gamelogics first,

then {createMarkerLocal [_marker, getPos player _x];

Something along this line still learning myself on this scripting.

Great work on this spunFIN. So i got your ambient ai script to work on a local listen server, but i got stuck on the spawning/client initialize screen, however after hitting esc and getting to the menu and choosing re-spawn everything worked great. At this point i decided to copy all the files inside of the LV and LV_functions folders to the proper directory on my hfb dedicated wasteland server. This included the working init file with the call statement i received from the assip app. I did all of this with the server stopped. i then restarted the server, let it completely load and then restarted it again just to make sure. After logging into the server and playing for over 10 mins never saw any ambient ai. Anyone think they can help me out? i'm sure i just missed something small and stupid, but i've been banging my head on a wall trying to get this to work.

Share this post


Link to post
Share on other sites

So I'm trying to use the custom init parameter and it keeps giving me a very vague error about a missing bracket. Here's how I'm running the script:

       [_zonePos,2,true,false,1500,"random",false,250,_zoneRad,_count,1,50,false,false,false,true,["PATROL",_zonePos,_zoneRad],false,"default",nil,"switch (paramsArray select 10) do {case 1: {[this] execVM 'dostuff.sqf';};case 2: {[this] execVM 'dostuff2.sqf';};case 3: {[this] execVM 'dostuff3.sqf';};case 4: {[this] execVM 'dostuff4.sqf';};};"] execVM "LV\heliParadrop.sqf";

Can anyone spot a syntax error or something else that would cause this?

Share this post


Link to post
Share on other sites

gobi42,

I'll ask around if my buddies have seen that issue. You're right that it's probably just something small since people are using it in dedicated servers.

SilentSpike,

Semicolons will actually break that, as compiles stuff after finding one. So to fix if, you should just use custom init to execVM a file which would have that switch block in it.

Share this post


Link to post
Share on other sites

So i got it to work on the dedicated server. however now i have another problem, as it is a a3watselad mission there are 3 player sides (blufor, Opfor, and inpendent. all the mission ai is spawn under cilivans. So now hopefully an easier question how or what do i change to make them spawn as cilivans?

Edited by gobi42

Share this post


Link to post
Share on other sites

SilentSpike,

Semicolons will actually break that, as compiles stuff after finding one. So to fix if, you should just use custom init to execVM a file which would have that switch block in it.

Aha, will keep that in mind in future. Thanks!

Any luck with the helicopter landings by the way?

Share this post


Link to post
Share on other sites

This is not necessary as it's AI and Stamina is not a Factor, However it is a factor for a player witch i think really needs a setting for but a simple way around this is to just add this script line to the init of the player or AI if you really think it's needed, While I Use This for Player, it' still adds fatigue but you can run longer and farther with out that stupid annoying sounds and if you just raise the last number 0.4 to 0.9 it removes it completely or you can use setfatigue false:

while {True} do {
player setfatigue (getfatigue player - 0.2 - random 0.4);
sleep 0;
};

No more "endurance" in setskill for arma3.

https://community.bistudio.com/wiki/AI_Sub-skills

Share this post


Link to post
Share on other sites
So i got it to work on the dedicated server. however now i have another problem, as it is a a3watselad mission there are 3 player sides (blufor, Opfor, and inpendent. all the mission ai is spawn under cilivans. So now hopefully an easier question how or what do i change to make them spawn as cilivans?

How exactly did you manage to get it to work on a dedicated server. I'm facing the same problem. Local and SP works fine but on a dedicated server the simpleCache script stores the units but doesn't respawn them when you are in the vicinity

Share this post


Link to post
Share on other sites
How exactly did you manage to get it to work on a dedicated server. I'm facing the same problem. Local and SP works fine but on a dedicated server the simpleCache script stores the units but doesn't respawn them when you are in the vicinity

I always delete the old init file before i do anything. i ended deleting all the files for it and re uploaded all them to the root dir. of the server. (i even re downloaded a another copy of the zip file) then i ran assip and added the following line to the init.sqf file

nul = [450,900,30,300,6,[0,0,1],player,"default",0,2500,nil,["AWARE","MOVE"],true] execVM "LV\ambientCombat.sqf"

then uploaded it to the server. started the server let it fully boot, then restarted it let it fully reboot again and then logged into the server.

i haven't had the need to use simpleCache script yet. The militarize fill house scripts both have an option for making them civilian but i couldn't get that to work either.

Share this post


Link to post
Share on other sites

Seems like there's a strange issue with the heliParadrop whereby if captive is set to true the helicopter flies to the given position and then stops moving and nobody jumps out. Might be something to do with a combination of parameters so here's how I'm calling it:

[ZonePos,1,true,true,ZoneRad + 1000,"random",true,250,ZoneRad,_count,1,50,false,false,false,true,["PATROL",ZonePos,ZoneRad],false,"default",nil,"[this] call spike_fnc_apply;"] execVM "LV\heliParadrop.sqf";

ZonePos is just a position array and ZoneRad is just a numerical value, in the test where I experienced the behavior it was set to 1000. The init field can be ignored.

edit: oh and _count is just a random int in the range 4-8.

As a suggestion also: Might be worth setting the helicopter waypoints to combat mode "BLUE" as it can start engaging targets and go off course otherwise.

Edited by SilentSpike

Share this post


Link to post
Share on other sites

im making a range mission that needs a ability to reinforce an area once the enemy loses 70% of its force using the reinforcementchopper... can anybody help me.

Share this post


Link to post
Share on other sites
im making a range mission that needs a ability to reinforce an area once the enemy loses 70% of its force using the reinforcementchopper... can anybody help me.

***Originally Posted by***spunFIN

Okay, then one way to identify the militarize units would be using ID parameter of militarize. Basicly it works like this:

1. Set ID parameter, for example to 4

2. Now there's global variable created: LVgroup4 which refers to the group you spawn with that instance of militarize where you set ID to 4

3. Using that variable you can now count alive militarize units with line:

{alive _x} count units LVgroup4Then there's few ways to use this information; triggers or custom scripts. As script would give you way more possibilities, let's walk thru it with simple way:

1: Create custom script in your mission folder, like "countMilitarize.sqf". And inside of it:

 private["_originalCount","_limit"]; //good habit to private local variables

sleep 30; //script waits 30 secs at this point - to make sure militarize had enough time to spawn all units

_originalCount = {alive _x} count units LVgroup4; //count units and save this data to _originalCount
_limit = round(_originalCount * .70); //_limit = how many units is 70% of _originalCount

waitUntil{sleep 4; ({alive _x} count units LVgroup4) <= _limit}; //this line makes this script to wait here until this condition is true (checks every 4 secs)

//And here you do all the magic you want. You can call other scripts here the same way as in editor.
hint "LVgroup4 has only 70% units left!";

2: If you call your militarize instance with ID 4 in editor from some init line, you probably want to call countMilitarize.sqf from the same init field, so just use: nul = execVM "countMilitarize.sqf";

Basicly ideal way would be calling this custom script from inside of militarize.sqf, just when it has spawned all units, but I guess you'll get started with this. Oh btw, this wont work if you're using simpleCache or simpleCacheV2.

I hope this helps even a bit. I actually made a mission template where's few different dynamic reinforcement events with many different options, but it wont work with current version of AISSP.***

The code below is a loop for reinforcing

(all this goes below that waitUntil in the original piece)

nul = [player,true,2,2,false,true,player,"random",1000,true,false,8,"default",[false,true,false,false],nil,nil,8,false] execVM "LV\reinforcementChopper.sqf"; //first reinforcements
waitUntil{sleep 1; !isNil("LVgroup8")}; //make script wait until its group is created

_Count = {alive _x} count units LVgroup8; //that same math again
_Limit = round(_Count * .30);

while{true}do{ //infinite loop
_Count = {alive _x} count units LVgroup8; //update alive count on each time this loops
if(_Count <= _Limit)then{ //if less than 30%, create new instance of reinforcementChopper with same ID (8)
nul = [player,true,2,2,false,true,player,"random",1000,true,false,8,"default",[false,true,false,false],nil,nil,8,false] execVM "LV\reinforcementChopper.sqf";
waitUntil{sleep 1; ({alive _x} count units LVgroup8)>_Limit}; //to be safe, let's again wait for units to spawn before script continues
};
 sleep 4; //loops in 4s cycle
};

That's quite pseudo code, I hope I didn't make typos.***

And this is very simple way, but it has one bug: we're using here only LVgroup8 now, so when new instance of reinforcementChopper is created, it overwrites original variable "LVgroup8". So if there's still those alive units from last chopper, it wont take them to next count of 30%. But I don't know, it might not be too bad thing, having like a cheap increasing difficulty level. :P

If it works, maybe next there could be some random factors like possibility for 2 choppers to spawn, or maybe a chance for heliParadrop or something, etc.

Thanks a bunch! spunFIN for the scripts

Edited by battlecarrysabot

Share this post


Link to post
Share on other sites

Hello,

the "fire" order block the IA firing function. (militarize chemlight...)

here is the correction.

if(_smokesAndChems)then{
[_milGroup] spawn {
	private ["_grp","_chance"];
	_grp = _this select 0;
	while{(count units _grp) > 0}do{
			{
				if((behaviour _x) == "COMBAT")then{
					if(daytime > 23 || daytime < 5)then{
						_chance = floor(random 100);
						if(_chance < 3)exitWith{
							if("Chemlight_green" in (magazines _x))exitWith{
								_x forceWeaponFire ["ChemlightGreenMuzzle","ChemlightGreenMuzzle"];
							};
							if("Chemlight_red" in (magazines _x))exitWith{
								_x forceWeaponFire ["ChemlightRedMuzzle","ChemlightRedMuzzle"];
							};
							if("Chemlight_yellow" in (magazines _x))exitWith{
								_x forceWeaponFire ["ChemlightYellowMuzzle","ChemlightYellowMuzzle"];
							};
							if("Chemlight_blue" in (magazines _x))exitWith{
								_x forceWeaponFire ["ChemlightBlueMuzzle","ChemlightBlueMuzzle"];
							};
						};
					};
					if("SmokeShell" in (magazines _x))exitWith{ 
						_chance = floor(random 100);
						if(_chance < 3)exitWith{
							_x forceWeaponFire ["SmokeShellMuzzle","SmokeShellMuzzle"];
						};
					};
				};
			}forEach units _grp;
		sleep 10;
	};
};
};

Share this post


Link to post
Share on other sites

I posted something similar on the thread for Massi's mod for spenatz units.

Then I thought this thread is probably the best place to ask.

I'm just wondering- has anyone figured out how you can use this ai script to call modded units? I know there is a custom init and have and do use that for various things. The class name for the massi spenatz mod is: mas_rus_spet. Is there a way to create an option under selecting "east" units to include modded units (or west for that matter, nato modded units, etc) ?

Just wondering if anyone has managed to do that or similar? I personally love using this script and it would be great to utilise it and after all in the future there will probably be many more modded units.

Any suggestions would be great. 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

×