Jump to content

Recommended Posts

I like to say that this i s GOOD SCRIPT, THANKS-

 

I wonder how i can get this simpleCache to work, i don't get it to work i think.
 

I have a game logic and name it target1
nul = [target1,2,210,[true,false],[true,false,false],false,[3,5],[1,0],[0.2,0.2,0.2,0.85,0.9,0.75,0.1,0.6,1,1],nil,nil,1] execVM "LV\militarize.sqf";
Game logic

nul = [[target1],[player],300,true,false] execVM "LV\LV_functions\LV_fnc_simpleCache.sqf";

The spawn right in the map so i don't know why, thay don't spawn when im 300 meters away. ?

Share this post


Link to post
Share on other sites

Updated but reinforcement chopper just will not Land it just Hovers

 

Anyone have any idea's  or a working copy

 

Cheers

Share this post


Link to post
Share on other sites

I'm not sure if this is actually happening, but it seems as if both helicopters and aircraft are subject to the bounded despawn radius.

If I could make a helpful suggestion, it would be to include an option disable the despawn limit, especially for aircraft if not include a new variable that applies exclusively to aircraft to retain the option of keeping ground-level combat moving quickly whilst preventing cumbersome despawning of aircraft.

Share this post


Link to post
Share on other sites

only some scripts in this pack work. others need updating. see the above posts from me. unfortunately, OP left a while ago and well, this is whats left. may be some day, someone more advanced than me with coding can get this pack up and running. good stuff to have.

Share this post


Link to post
Share on other sites

The ambient combat module works alright, which is nice, but there are some things that could use improving. I personally would like better control over maximum units per group for vehicles and squads when spawning. The script would work better if there were more groups with a reduced overall limit of total people per-group.

As previously mentioned the aircraft kind of need to be fixed because it's way too easy for them to fly out of bounds and spontaneously blow up, but overall it inherits the legacy of ThomsonB's Flashpoint script set well enough.


In fact if anyone were interested, it would be helpful if somebody could offer a solution to creating a min/max constraint to the random squad generation routine.
 

private ["_BLUmen3","_OPFarrays","_BLUarrays","_INDgrp","_INDhq","_INDmen","_OPFmen2","_BLUmen2","_pos","_side","_size","_BLUmen","_OPFmen","_men","_amount","_BLUhq","_BLUgrp","_OPFhq","_OPFgrp","_grp","_i","_man1","_man","_leader"];

_pos = _this select 0;

_side = _this select 1;

_size = _this select 2;

_grpId = if (count _this > 3) then { _this select 3;} else {nil};
_BLUmen = ["B_Soldier_A_F","B_soldier_AR_F","B_medic_F","B_engineer_F","B_soldier_exp_F","B_Soldier_GL_F","B_soldier_M_F","B_soldier_AA_F","B_soldier_AT_F","B_officer_F","B_soldier_repair_F","B_Soldier_F","B_soldier_LAT_F","B_Soldier_lite_F","B_Soldier_SL_F","B_Soldier_TL_F","B_soldier_AAR_F","B_soldier_AAA_F","B_soldier_AAT_F"];

_BLUmen2 = ["B_recon_exp_F","B_recon_JTAC_F","B_recon_M_F","B_recon_medic_F","B_recon_F","B_recon_LAT_F","B_recon_TL_F","B_soldier_AAR_F","B_soldier_AAA_F","B_soldier_AAT_F"];

_BLUmen3 = ["B_G_Soldier_A_F","B_G_soldier_AR_F","B_G_medic_F","B_G_engineer_F","B_G_soldier_exp_F","B_G_Soldier_GL_F","B_G_soldier_M_F","B_G_officer_F","B_G_Soldier_F","B_G_soldier_LAT_F","B_G_Soldier_lite_F","B_G_Soldier_SL_F","B_G_Soldier_TL_F"];

_BLUarrays = [_BLUmen,_BLUmen2,_BLUmen3];

_OPFmen = ["O_Soldier_A_F","O_soldier_AR_F","O_medic_F","O_engineer_F","O_soldier_exp_F","O_Soldier_GL_F","O_soldier_M_F","O_soldier_AA_F","O_soldier_AT_F","O_officer_F","O_soldier_repair_F","O_Soldier_F","O_soldier_LAT_F","O_Soldier_lite_F","O_Soldier_SL_F","O_Soldier_TL_F","O_soldier_AAR_F","O_soldier_AAA_F","O_soldier_AAT_F"];

_OPFmen2 = ["O_recon_exp_F","O_recon_JTAC_F","O_recon_M_F","O_recon_medic_F","O_recon_F","O_recon_LAT_F","O_recon_TL_F","O_soldier_AAR_F","O_soldier_AAA_F","O_soldier_AAT_F"];

_OPFarrays = [_OPFmen,_OPFmen2];

_INDmen = ["I_Soldier_A_F","I_soldier_AR_F","I_medic_F","I_engineer_F","I_soldier_exp_F","I_Soldier_GL_F","I_soldier_M_F","I_soldier_AA_F","I_soldier_AT_F","I_officer_F","I_soldier_repair_F","I_Soldier_F","I_soldier_LAT_F","I_Soldier_lite_F","I_Soldier_SL_F","I_Soldier_TL_F","I_soldier_AAR_F","I_soldier_AAA_F","I_soldier_AAT_F","DLCG_Orthes_IA_soldier_chef_equipe","DLCG_Orthes_IA_shotgun","DLCG_Orthes_IA_soldier","I_G_Offroad_01_armed_F"];
_men = [];

if(typeName _size == "ARRAY")then{

_amount = ((random (_size select 0)) + (_size select 1));

}else{

_amount = _size;

};
switch(_side)do{

case 0:{

  _men = (_BLUarrays call BIS_fnc_selectRandom);

  _BLUhq = createCenter west;

  _BLUgrp = createGroup west;

  _grp = _BLUgrp;

};

case 1:{

  _men = (_OPFarrays call BIS_fnc_selectRandom);

  _OPFhq = createCenter east;

  _OPFgrp = createGroup east;

  _grp = _OPFgrp;

};

case 2:{

  _men = _INDmen;

  _INDhq = createCenter resistance;

  _INDgrp = createGroup resistance;

  _grp = _INDgrp;

};

};
_i = 0;

for "_i" from 0 to _amount do {

_man1 = _men select (floor(random(count _men)));

_man = _grp createUnit [_man1, _pos, [], 0, "NONE"];

};
if(!isNil("_grpId"))then{

call compile format ["LVgroup%1 = _grp",_grpId];

};
_leader = leader _grp;

_leader



Share this post


Link to post
Share on other sites

Hello, I have a question to ask.
I am creating an area for cqb training.
How do I repopulate the area after the first session?
Thanks

Share this post


Link to post
Share on other sites

Hello thx for your jobs, i have one question how to disable ai ground spawn when players (in multiplayer) are in helicopter ? Thx! And sorry for language...

Share this post


Link to post
Share on other sites

Hello, noob scripter here... Is there a way to prevent water units from being created in AmbientCombat script? I.E. 3/4 of the spawn "donut" are over water since i start my mission in the corner of the map and this results in far too many units being spawned as boats / divers and therefore an empty feel even with 20 groups enabled

Thanks

Share this post


Link to post
Share on other sites

Hi Spunfin (or anyone else)

 

Can you tell me the difference between :  Al Spawn Script Pack by Spunfin    and     AIRS - Al Respawn System (Beta) by Spunfin.

 

Thanks

 

 

 

Share this post


Link to post
Share on other sites

The ambient combat. When I use it in multiplayer, does the Ambient combat spawn system take into account other players? IE 2 players are 1km from each other. I set the AI groups to spawn from from 900m to 1100m from center units and started AC for both the units. Will the AC spawner spawn AIs, that are out of range of the center unit, but might be right next to the other player? Or does your script account for that eventuality? Also if there is an array of all players, how does the maximum number of spawned groups apply? Is it for each center unit, or in total?

 

Thanks

Share this post


Link to post
Share on other sites

Anyone experienced issues with the AI from the fillhouse script deciding to kill each other as soon as they spawn?

 

I've seen this before once, with the Zen occupy script, can't remember how I solved it though :(

 

It's almost like they see each other as the enemy! - This is on a multiplayer server.

 

Nothing in the RPT logs, spawning them as 1 group, EAST, as below:

 

null = ["ai_sp1",2,true,2,50,250,0.9,nil,nil,1] execVM "LV\fillHouse.sqf";

(ai_sp1 is of course a marker).

 

I tried giving them a group name in the group parameter, but that throws an error if I do that.

 

Anyone have any ideas?

Share this post


Link to post
Share on other sites

Okay, time to update!

Version 1.0

http://kaartomedia.com/ARMA/AI%20Spawn%20Script%20Pack%201.0.rar

Online documentation (Note that the Flash app wont work yet as it has old parameters!)

This one is the .sqf versions with many changes and fixes. Package includes fairly simple example missions and documentation. Flash app for the init lines is also coming soon!
I tried my best to also update all comments in the scripts.

There's some new parameters allowing some more customization that people have requested.
Also one major change is that all the classnames for AI comes now from LV\config_aissp.hpp.
Therefore you must include this into your missions description.ext:

class aissp_configs
{
	#include "LV\config_aissp.hpp"
};


Scripts has a "classes"-parameter, which is an array of classes from config_aissp.hpp (with the exception of "ALL", which includes all default classes to the array).

By using classes-parameter you can filter classnames, for example:

["BLU_CTRG","IND_C_F","OPF_T_F"]

Or even use custom units by creating custom classes into the .hpp file. I included an empty example that you can fill with any classnames you want. You may have as many custom classes as you wish, and you can use them the same way as default classes, via classes-parameter.

I have tested these new versions only in SP mode (also simpleCache seems to be working), so test everything out before you hit it to your server!

Cheers! I'll fix the flash app asap and write some better changelog once I get some time for it.

  • Like 2

Share this post


Link to post
Share on other sites
14 hours ago, spunfin said:

Okay, time to update!

Version 1.0

http://kaartomedia.com/ARMA/AI%20Spawn%20Script%20Pack%201.0.rar

Online documentation (Note that the Flash app wont work yet as it has old parameters!)

This one is the .sqf versions with many changes and fixes. Package includes fairly simple example missions and documentation. Flash app for the init lines is also coming soon!
I tried my best to also update all comments in the scripts.

There's some new parameters allowing some more customization that people have requested.
Also one major change is that all the classnames for AI comes now from LV\config_aissp.hpp.
Therefore you must include this into your missions description.ext:


class aissp_configs
{
	#include "LV\config_aissp.hpp"
};


Scripts has a "classes"-parameter, which is an array of classes from config_aissp.hpp (with the exception of "ALL", which includes all default classes to the array).

By using classes-parameter you can filter classnames, for example:


["BLU_CTRG","IND_C_F","OPF_T_F"]

Or even use custom units by creating custom classes into the .hpp file. I included an empty example that you can fill with any classnames you want. You may have as many custom classes as you wish, and you can use them the same way as default classes, via classes-parameter.

I have tested these new versions only in SP mode (also simpleCache seems to be working), so test everything out before you hit it to your server!

Cheers! I'll fix the flash app asap and write some better changelog once I get some time for it.

 

@spunfin good to see an update on this script pack. Thanks for your hard work mate.

Share this post


Link to post
Share on other sites

@spunfin thank you so much for updating this pack  i love this scripts they are easy to implent and easy to set up / change to what the user needs i was totaly lost without these scripts 

Share this post


Link to post
Share on other sites

Here's now also the updated Flash app for version 1.0. I hope it makes things easier for you guys.

 

@supergruntsb78 Nice, I hope you enjoy! :)

 

@mikepetunia That sure sounds odd. Must be something with zen occupy mixed with fillHouse, I'll try to see if I can spot the reason for this. Is it still happening?

 

@majogl Yes it should notice all players when MP-parameter is set to true, and spawn & move ambientCombat related to all alive non-captive players. So basicly the player array means nothing when you set that parameter to true as the script then occupies the array with all alive players.

Group amount is fixed total amount, so it's not related to player amount in any way. It's a good idea though, I should consider allowing that functionality.

+I added a parameter to prevent water units to be spawn! :)

 

@B00Ts-SA AIRS was just a tiny brain fart, aiming to build quickly the same feeling you had when you played Battlefield 2 back in the day. I haven't updated it for a long time, so I'm not completely sure if it's working or not.

 

@Royal Eagles That's a good idea! Currently you can't, without modifying the scripts. But this will certainly be added to next update!

 

@Gianluca Mombelli I'm not 100% sure what you mean, but if you're using fillHouse and militarize, you can achieve this with combination of triggers and "LV_fnc_removeGroup.sqf" (see example from documentation, right on bottom part of militarize or fillHouse).

So basicly you would have global variable, f.ex. "mil1spawned" as 1 condition for a trigger, and you'd set it to true when you initialize militarize via trigger. (Remember to also use unique ID-number for militarize.) Then, when you use removeGroup, or when you check if militarize goup is dead, set "mil1spawned" back to false to allow reactivation of the trigger.

Check also my randomSectors1.sqf for scripted approach.

 

@pd3 Thanks for your input! You seem to have very good ideas, I'll definitely include those to next update!

Share this post


Link to post
Share on other sites


@spunfin Sorry for the late reply, busy week at work!

 

Yup, still happens. It's almost like if AI are spawned from separate scripts, they hate each other :D - Full disclosure, this is on an Exile server. Still, I don't think Exile messes with side relations or setfriend at all... I'll dig through the scripts to be sure and will also look for any addrating statements which I guess may effect it.

 

I got around it on the fillhouse script, by setting them as captive in the loop that spawns them, whilst also using a _tempgroup in that loop, then outside of the spawn loop, I make them all join a new group (the main one) and setcaptive as 0/false... seems to stop all issues with them attacking each other...

 

... But now if I call a heli support (para or reinforcement), the ground/building guys go to war with the helis :P

Share this post


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

 

@majogl Yes it should notice all players when MP-parameter is set to true, and spawn & move ambientCombat related to all alive non-captive players. So basicly the player array means nothing when you set that parameter to true as the script then occupies the array with all alive players.

Group amount is fixed total amount, so it's not related to player amount in any way. It's a good idea though, I should consider allowing that functionality.

+I added a parameter to prevent water units to be spawn! :)

 

Hey there, thanks for the answer. One followup. If you have 10 groups spawning per player and, say, 4 players in close proximity... Will it account for this, or will it spawn 40 groups around the players.

 

Also, on suggestion. Would be awesome if it was possible to not only pick a side in militarize, fillhouse, and AC scripts, but also the faction youd like the spawned units be from. for example if you are using RHS, you could have opfor as one of their russian factions.

 

The spawn system could then get all the units/vehicles/compositions belonging to that side from config.

Share this post


Link to post
Share on other sites

@mikepetunia Haha, yeah it sounds like they just hates each others. Can't see what is messing it, it sounds like they'd have a wrong side value, but I'm sure you have already tried everything simple related to sides etc.

 

@majogl In that scenario it would surely have all 40 groups arount the 4 players. Thanks for pointing this out, it must be taken account of when I bring the player amount related AI options into the script.

 

  Now you can actually pick factions, or even custom classes for all the scripts. The last parameter in all of these scripts in version 1.0 is "classes parameter", and it's basicly an array of strings, that are classes from "LV\config_aissp.hpp". So if you open up this .hpp file, you can see that there's classes for all fanctions including all their classnames.

  As default, the classes parameter for scripts is ["ALL"], which uses all those default classes from the .hpp. But if you change it for example to ["OPF_T_F"], the script will pick classnames only from that class. Just remember to pick a class or classes of the same side you're going to spawn.

  The very first class is empty, so that you can for example fill it with classnames that comes from a mod. Then in script init line you'd just use ["customClass1","customClass2","customClass3"], or whatever you name your custom classes. Just remember to keep custom classes divided per sides so that you don't end up having west unit with east classname.

  Another very important usage for this .hpp file would be when you use reinforcementChopper, since if you just randomize the chopper it uses, it might be one of those support choppers with no room for reinforcement group. So you could make custom classes for actual troop transportation choppers, or just check a index number of one to be used in the script init line.

 

(Note that it doesn't matter which "men"-array you use for infantry classnames. There's that many of them only becouse some factions has special groups, and I needed to divide them into separated arrays so that scripts can pick one random infantry array for a group instead of having mixed groups.)

Share this post


Link to post
Share on other sites

anyway to get ai to get in turrets? what do you put in the custom init to get them to do this?

also is there a way to get the heliparadrop chopper to 3dsay a song?

Share this post


Link to post
Share on other sites

is it just me but when I spawn them in they just shoot each other , any idea why ?

 

nul = [_cpPos, 2, false, 2, 50, 1, 0.75, nil, nil, 9, ["OPF_T_F"]] execVM "LV\fillHouse.sqf";

 

Share this post


Link to post
Share on other sites
2 hours ago, 1para{god-father} said:

is it just me but when I spawn them in they just shoot each other , any idea why ?

 


nul = [_cpPos, 2, false, 2, 50, 1, 0.75, nil, nil, 9, ["OPF_T_F"]] execVM "LV\fillHouse.sqf";

 

Are you using this call line in a sqf script or from a trigger ?

When i try to spawn the fillhouse script from a marker called Dot(cap_pos_marker) it generates an error in script "_center" is not defined.

I'm using this call line:  nul = [cap_pos_marker, 2, true, 1, 10, 1, "default", nil, nil, 5, ["all"]] execVM "LV\fillHouse.sqf";

 

Am i missing something vital ?

 

I'm using a Hostage-script where a hostage is spawn randomly using markers as a spawnpoint. I would really like to have the fillhouse script spawn a couple of soldiers as a guard-team together with the hostage.

Any ideas ?

 

/Bengt

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

×