Jump to content

Recommended Posts

I have a proof of concept mission with nothing other than a rifleman and a Game Logic unit with a fillHouse script taken directly from the app. I am positive the LV folder is in place. However, I get the error
Script LV\fillHouse.sqf not found

Why is this happening?

Thanks for the help

You positive fillHouse.sqf is in that LV folder and the LV folder is in the root folder of your mission? The engine is basically saying it doesn't see that file in that location.

Share this post


Link to post
Share on other sites

I got it working. How can I control the type of units that are spawned? I've run it a few times and the unit types that are generated don't always make sense in the setting. I cannot thank you guys enough for these, they're going to make my life much easier.

Share this post


Link to post
Share on other sites
How can I control the type of units that are spawned?

Open the fillhouse/militarize script, there's a unit array near the top.

_blueMenArray = ["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"];
_blueMenArray2 = ["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"];
_blueMenArray3 = ["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 = [_blueMenArray,_blueMenArray2,_blueMenArray3];
_redMenArray = ["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"];
_redMenArray2 = ["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 = [_redMenArray,_redMenArray2];
_greenMenArray = ["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"];

Share this post


Link to post
Share on other sites

Hey guys, I have been running over this issue for a couple of hours and cannot figure it out.

I can get militarize.sqf to work fine if I do a _null = [this] execVM "LV\militarize.sqf" with a Game Logic, but I do not want that because I have an object that has an addAction on it, that executes "training\startMOUT.sqf".

Here is the relevant code in startMOUT.sqf:

// Spawn troops
_spawnPos = getMarkerPos "mout_occupation";
_moutMarker = createMarker ["mout_marker", _spawnPos];
"mout_marker" setMarkerType "o_unknown";
"mout_marker" setMarkerText "MOUT";

_null = [_spawnPos] execVM "..\LV\militarize.sqf";

Please help, this is getting really frustrating. Can you just not call militarize from a script file?

Also, the pathing is correct, I have verified this. The script calling this is in /training so I have to back up (..) then go into LV, then hit militarize.sqf.

I have also tried this:

// Spawn troops
_spawnPos = getMarkerPos "mout_occupation";
_moutMarker = createMarker ["mout_marker", _spawnPos];
"mout_marker" setMarkerType "o_unknown";
"mout_marker" setMarkerText "MOUT";

if (isNil("LV_militarize")) then {
LV_militarize = compile preprocessFile "..\LV\militarize.sqf";
};

//_null = [_spawnPos] call LV_militarize;
_null = [_spawnPos] execVM LV_militarize;

I have tried execVM, call, spawn...nothing works.

And you can sort of ignore the mout_marker marker...I just wrote that to make sure the position I was getting was valid.

Edit:

I got this working! Turns out even if the script lives elsewhere, still have to call it as "LV\militarize.sqf" -- I had tried this before, but I think my arguments were slightly off. All is well, now.

Edited by zaphodbeeblebrox

Share this post


Link to post
Share on other sites
Open the fillhouse/militarize script, there's a unit array near the top.

_blueMenArray = ["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"];
_blueMenArray2 = ["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"];
_blueMenArray3 = ["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 = [_blueMenArray,_blueMenArray2,_blueMenArray3];
_redMenArray = ["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"];
_redMenArray2 = ["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 = [_redMenArray,_redMenArray2];
_greenMenArray = ["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"];

So do I add the array of units I want to the Game Logic, or do I delete all but the units I want in the script? I apologize for my lack of understanding, but I really appreciate the help

Share this post


Link to post
Share on other sites
So do I add the array of units I want to the Game Logic, or do I delete all but the units I want in the script? I apologize for my lack of understanding, but I really appreciate the help

Have a look in the code you're talking about.

You have arrays defined like this:

_redMenArray = ["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"];
_redMenArray2 = ["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 = [_redMenArray,_redMenArray2];

Ok, so where else are these called? How are they used? We see it below:

case 2: {
       _milHQ = createCenter east;
       if(isNil("_milGroup"))then{_milGroup = createGroup east;}else{_milGroup = _milGroup};
       _menArray = (_OPFarrays call BIS_fnc_selectRandom);
   };	

So when side is 2, _menArray is being set to _OPFarrays call BIS_fnc_selectRandom. BIS_fnc_selectRandom selects a random element within an array. OPFarrays is redMenArray and redMenArray2 in an array together, so it will randomly select one of those arrays.

So then, if you want to always spawn a certain static group of people, create perhaps a redMenArray3 or redMenStatic, assign it the people you want, and then set _menArray to that array. Alternatively, you could just replace (_OPFarrays call BIS_fnc_selectRandom) with the name of redMenArray or redMenArray2.

Changing the two arrays already set but not changing the call below will just change the two groups that are possible to spawn.

Make sense?

Share this post


Link to post
Share on other sites

hey there i am still loving this script but i wanted to update the reinforcementchopper types for he sides (RES has gotten a nice one now :) )

if i update the following lines in reinforcementchopper.sqf

 WEST: 1 = B_Heli_Light_01_armed_F, 2 = B_Heli_Light_01_F, 3 = B_Heli_Transport_01_F
			EAST: 1 = O_Heli_Attack_02_F, 2 = O_Heli_Attack_02_black_F, 3 = O_Heli_Light_02_F, 4 = O_Heli_Light_02_unarmed_F
			INDEPENDENT: 1 = I_Heli_Transport_02_F

with

 WEST: 1 = B_Heli_Light_01_armed_F, 2 = B_Heli_Light_01_F, 3 = B_Heli_Transport_01_F
			EAST: 1 = O_Heli_Attack_02_F, 2 = O_Heli_Attack_02_black_F, 3 = O_Heli_Light_02_F, 4 = O_Heli_Light_02_unarmed_F
			INDEPENDENT: 1 = I_Heli_Transport_02_F, 2 = I_Heli_light_03_unarmed_F 

and a bit lower

 _BLUchoppers = ["B_Heli_Light_01_armed_F","B_Heli_Light_01_F","B_Heli_Transport_01_F"];
_OPFchoppers = ["O_Heli_Attack_02_F","O_Heli_Attack_02_black_F","O_Heli_Light_02_F","O_Heli_Light_02_unarmed_F"];
_INDchoppers = ["I_Heli_Transport_02_F"];

with

 _BLUchoppers = ["B_Heli_Light_01_armed_F","B_Heli_Light_01_F","B_Heli_Transport_01_F"];
_OPFchoppers = ["O_Heli_Attack_02_F","O_Heli_Attack_02_black_F","O_Heli_Light_02_F","O_Heli_Light_02_unarmed_F"];
_INDchoppers = ["I_Heli_Transport_02_F","I_Heli_light_03_unarmed_F"];

it would work ?

EDIT : NEVERMIND FOUND OUT IT WORKS :) :D

Edited by supergruntsb78
tried and it worked

Share this post


Link to post
Share on other sites

These scripts have gotten even more awesome.

Request: Could Militarize have multiple markers so that units can patrol inside markers as well as move to any additional markers and patrol inside of them.

Share this post


Link to post
Share on other sites

Care to tell me why this isn't working?

It's part of the init.sqf, does nothing in singleplayer, nothing in multiplayer

nul = [zone,2,50,[true,false],[false,false,false],false,[10,6],[3,0],"default",nil,nil,1] execVM "LV\militarize.sqf";

nul = [zone_1,2,50,[true,false],[false,false,false],false,[20,6],[3,0],"default",nil,nil,1] execVM "LV\militarize.sqf";

nul = [zone_2,2,50,[true,false],[false,false,false],false,[6,6],[3,0],"default",nil,nil,1] execVM "LV\militarize.sqf";

nul = [zone_3,2,50,[true,false],[false,false,false],false,[6,4],[3,0],"default",nil,nil,1] execVM "LV\militarize.sqf";

nul = [zone_4,2,50,[true,false],[false,false,false],false,[6,4],[3,0],"default",nil,nil,1] execVM "LV\militarize.sqf";

nul = [zone_5,2,50,[true,false],[false,false,false],false,[10,6],[3,0],"default",nil,nil,1] execVM "LV\militarize.sqf";

nul = [zone_6,2,50,[true,false],[false,false,false],false,[10,6],[3,0],"default",nil,nil,1] execVM "LV\militarize.sqf";

nul = [zone_7,2,50,[true,false],[false,false,false],false,[10,6],[3,0],"default",nil,nil,1] execVM "LV\militarize.sqf";

nul = [zone_8,2,50,[true,false],[false,false,false],false,[6,2],[3,0],"default",nil,nil,1] execVM "LV\militarize.sqf";

nul = [[player1,player2,player3,player4,player5,player6,player7,player8,player9,player10,player11,player12,player13],[player1],1000,true,true] execVM "LV\LV_functions\LV_fnc_simpleCache.sqf";

Share this post


Link to post
Share on other sites

Theses scripts work perfectly, even the cacheing element, I still use them now...

Share this post


Link to post
Share on other sites

@Flens,

I really don't know how to explain everything better, you are the very first person with this that lost. Calm down for a couple of secs and look closer. Documentation has very clear explanations, and I even included more than simple example missions where you can see how and where.

1. What are zone, zone_1 etc? If those are markers, use quotes with them, as the documentation states multiple times. E.g. "zone","zone_1"...

2. ID parameter should be unique (integer) for each instance of militarize, you have set it as 1 for each call of it.

3. First array in simpleCache call should be all those unique ID's you defined for militarize instances.

4. Second array in simpleCache is player units you want this to work with. So if you have player1 there, you must name your player unit in editor as player1 also. If you set last parameter as true, it doesnt matter which player names you define here as the script automatically finds all non-captive playable units and uses them. +If it's set to true, this wont probably work in SP/Editor.

If you are unsure what everything means in my Flash app, check it out closer from Documentation. If you can read, you really can't be that lost. Best luck with it.

Share this post


Link to post
Share on other sites

I realized after a while what I had been doing wrong so corrected all the issues in the above, also tried using gamelogic instead of markers but no matter what different options I tried for calling the script (triggers, markers, gamelogic) opfor would only ever be spawning on my location.

Also before I keep sinking time into this, how exactly does your simplecache script work? Is it the same as the AI Caching and Distribution System in that it only removes squad members and keeps squad leads acting as a resource sink?

Share this post


Link to post
Share on other sites
I realized after a while what I had been doing wrong so corrected all the issues in the above, also tried using gamelogic instead of markers but no matter what different options I tried for calling the script (triggers, markers, gamelogic) opfor would only ever be spawning on my location.

Also before I keep sinking time into this, how exactly does your simplecache script work? Is it the same as the AI Caching and Distribution System in that it only removes squad members and keeps squad leads acting as a resource sink?

Sounds a bit odd. What do you have at your mission folder? I guess it should whine if you have files in wrong place.

Did you try any of the example missions? They are so simple that you get to experience AI spawnings straight away.

Currenty it works like this: scripts like militarize spawns units normally, and when simpleCache starts running -> it loops thru those ID's you defined and checks militarize -center-distances to players. If 'out of range' -> it deletes all AI units from that ID-identified militarize zone which is too far away. While deleting units, it saves the parameters you defined in militarize call, and when player comes near the zone -> it just simply recalls militarize with correct parameters. And it loops again and again checking the distances.

Couple different methods already planned for it, but haven't got any time to implement them yet.

Share this post


Link to post
Share on other sites

>Sounds a bit odd. What do you have at your mission folder? I guess it should whine if you have files in wrong place.

Well I'm not getting any script errors so dunno what to say. I had a look at the example missions but they don't use simplecache, do they? Is that what's fucking me over?

Share this post


Link to post
Share on other sites

Most common reason for issues with it is the last parameter of calling line, and player names etc. But in any case, they should spawn at mission start.

If you test in normal editor, try first with most simple combination:

-Use only one militarize and set its ID to 1. Call simpleCache with: (no need to name unit in editor since you're trying it locally, so your player unit == player)

nul = [[1],[player],500,false,false] execVM "LV\LV_functions\LV_fnc_simpleCache.sqf";

There also was couple post earlier few fixes for simpleCache (didnt find time & will to build 'official' update): http://forums.bistudio.com/showthread.php?165089-AI-Spawn-Script-Pack&p=2588051&viewfull=1#post2588051

Share this post


Link to post
Share on other sites

Seems to be working with the update

How exactly do I configure the simplecache line for multiplayer?

Is it necessary to have all the names of the playable units in the array?

Do I leave it blank?

Edited by Flens

Share this post


Link to post
Share on other sites

Everything appears to be working as it should but the simplecache script is extremely slow when it comes not just to despawning but more critically spawning enemies.

Any eays way to increase the frequency of player presence checks?

Edited by Flens

Share this post


Link to post
Share on other sites

How slow does it get for you? How many militarize's you have there and what distance are you using in simpleCache?

The main loop of it runs in 2s cycle (in that fixed version).

If you can share the .pbo or mission folder somewhere, I can check out if I'm able to spot some obvious reason for the slow-downs.

Share this post


Link to post
Share on other sites

I've wasted a lot of time on getting tasks working for a different mission but I'm back again at this and attempting your latest fix to the simplecache I get an error:

http://i.imgur.com/YQqnMYD.jpg

---------- Post added at 16:46 ---------- Previous post was at 16:40 ----------

Some questions btw, is it possible to set the helicopter reinforcement starting position to a specific location? (I'd like for all opfor reinforcements to be originating from one airbase)

How do I give the helidropped soldiers a waypoint for the player's location? How can I get this working in multiplayer?

Share this post


Link to post
Share on other sites

First off thanks for posting the scripts, good job.

Having a bit of a problem, mainly cause i'm a noob to ARMA3 editing. Stuck on a 3G connection so making single player missions. The one in question starts with a task to recon 4 towns to check for an enemy position. I've used your fillhouse scripts to fill the towns via gamelogic and want to activate the gamecache script to stop them from drawing until player's in reach.

Your example code is "nul = [[13,14],[playerUnit1],500,true,false] execVM "LV\LV_functions\LV_fnc_simpleCache.sqf";"

I'll change the distance from center etc, but where do i put this code to get it to work? should it be attached to the gamelogics via a trigger? I've tried all sorts but lucking out.

All the best

edit. ok being a donkey, sorted it. Put it in the missions init.sqf and sorted out the ID no's.

Edited by stimpy

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

×