spunfin 34 Posted November 17, 2014 Hey JAndrews1, You can disable those scripts inside main script files and add there something else if you prefer, but they are being used as default: militarize - vE, vH, vD fillHouse - vF, vG heliParadrop - vD (if set in parameters) reinformentChopper - vD (if set in parameters) The errors you got indicates that somehow your "target" unit/object could be faultly defined. Could you paste which scripts are you using, how you use them and where? FdgeKake, Sounds odd for sure, could you possibly share your mission files? Share this post Link to post Share on other sites
jandrews 116 Posted November 17, 2014 (edited) Hey JAndrews1,You can disable those scripts inside main script files and add there something else if you prefer, but they are being used as default: militarize - vE, vH, vD fillHouse - vF, vG heliParadrop - vD (if set in parameters) reinformentChopper - vD (if set in parameters) The errors you got indicates that somehow your "target" unit/object could be faultly defined. Could you paste which scripts are you using, how you use them and where? FdgeKake, Sounds odd for sure, could you possibly share your mission files? I would like to use them. I Wasn't sure if I was attempting to use them in addition to the main scripts that was causing errors for RPT. I think that's was I was doing. any how. error in spoiler. if(surfaceIsWater _newPos)then{ private["_randomWay","_dir"]; _dir = ((_newCenter select 0) - (_newPos select 0)) atan2 ((_newCenter select 1) - (_newPos select 1)); _randomWay = floor(random 2); while{surfaceIsWater _newPos}do{ if(_randomWay == 0)then{_dir = _dir + 20;}else{_dir = _dir - 20;}; if(_dir < 0) then {_dir = _dir + 360;}; _newPos = [(_newCenter select 0) + (sin _dir) * _pRange, (_newCenter select 1) + (cos _dir) * _pRange, 0]; }; }; Error Error Undefined variable in expression: _dir 23:25:50 File C:\Users\Andrews\Documents\Arma 3\missions\CO_20_EOS_Altis_Nato.Altis\LV\patrol-vE.sqf, line 43 23:25:50 Error in expression < _dir + 20;}else{_dir = _dir - 20;}; if(_dir < 0) then {_dir = _dir + 360;}; _n> 23:25:50 Error position: <_dir < 0) then {_dir = _dir + 360;}; _n> 23:25:50 Error Undefined variable in expression: _dir 23:25:50 File C:\Users\Andrews\Documents\Arma 3\missions\CO_20_EOS_Altis_Nato.Altis\LV\patrol-vE.sqf, line 44 23:25:50 Error in expression <wPos}do{ if(_randomWay == 0)then{_dir = _dir + 20;}else{_dir = _dir - 20;}; if(_> 23:25:50 Error position: <_dir + 20;}else{_dir = _dir - 20;}; if(_> Edited November 17, 2014 by JAndrews1 Share this post Link to post Share on other sites
avibird 1 154 Posted November 17, 2014 @SpunFIN I am still getting some issues when using the militarize & fillHouse together with the simplecachev.77 I am using triggers GL to call the scripts in and GL to delete units with the simplecachev. Sometimes the fillhouse will not delete or spawn in but sometimes it all works fine. I am only using MCC and DAC mod's. I turned off both but still occurs at times. Share this post Link to post Share on other sites
spunfin 34 Posted November 18, 2014 AVIBIRD 1, Can you set up a small mission where this happens or share your current mission files with MCC & DAC disables so I can take a look what's happening? Does this happen in singleplayer or multiplayer? csk222, 1. You could disable their movement via custom init with something like "this disableAI 'MOVE';", then they should stick where they spawned but still turn, aim & shoot. I've not tried this, but it should do, eventho it's not pretty. :P For more realistic results you would probably want to call external script from custom init which for example enables movement once player is near enought or something. There's also other commands related to this, like this forceSpeed 0; and doStop this; 2. & 3. Instead of player you could try referring to a group or array of groups (of player units), then these scripts uses LV_fnc_follow.sqf to target the nearest unit from the group(s) you defined there. Documentation -> target -> group and group array MP is my weak spot especially with dedicated server, but I know people have successfully done these things your trying to do. Share this post Link to post Share on other sites
avibird 1 154 Posted November 18, 2014 (edited) MP yes, I am still trying to ID what happens. Let me ask you a question I am using trigger not GL to call in script. I am calling the fillhosue & militarize at the same time. If I call one at a time no real issue but still testing I will let you know and gave you an example mission. How do I post a mission to this thread I never did that lol. Edited November 18, 2014 by AVIBIRD 1 Share this post Link to post Share on other sites
spunfin 34 Posted November 18, 2014 In MP yes I will still trying to ID what happens. Let me ask you a question I am using trigger not GL to call in script. I am calling the fillhosue & militarize at the same time. If I call one at a time no real issue but still testing I will let you know and gave you an example mission. How do I post a mission to this thread I never did that lol. Ah okay, what kind of trigger is it? You could first try setting those script into some GL or object init, since triggers might surely mess up simpleCache, as it works somehow like this: 1. fillHouse / militarize spawns units 2. simpleCache checks distances etc and decides if it removes those units or not, and starts looping to check these things again and again, and reacts if distances changes to valid or non-valid So there's need to run fillHouse & militarize instances only once. Share this post Link to post Share on other sites
avibird 1 154 Posted November 18, 2014 @spunFIN I think I found the issue this distance in the fillhouse & militarize needs to be the same if you are running the code in the same trigger. This is inside the trigger. The trigger zone is 2000 by 2000 with the AISSP marker in the middle. nul=["AISSPz1",2,true,2,[24,8],1000,"default",nil,nil,1] execVM "LV\fillHouse.sqf"; nul=["AISSPz1",2,1000,[true,false],[true,true,false],false,[24,8],[4,4],"default",nil,nil,2] execVM "LV\militarize.sqf"; I was having the fillhouse with a less distance from the marker then the militarize and that seems to be the issue. I will test play more. I will let you know. Avibird This is in the GL nul = [[1,2[player],1500,true,true] execVM"LV\LV_functions\LV_fnc_simpleCache.sqf"; ---------- Post added at 05:48 ---------- Previous post was at 05:26 ---------- @spunFIN one more little issue I see If you are using fillhouse & militarize in the same town on the small size you may need to limited the number of units in the fillhouse code. The above code will not work if the fillhouse had [24,8] but if I had [16,8] no issues noted with the fillhouse working in a small size town. More testing tomorrow. Share this post Link to post Share on other sites
drsubo 10 Posted November 18, 2014 I'm kind of new to all this so if anyone can help me that would be great. I'm trying to change a few things around in the ambientcombat.sqf to fit my mission needs. I'm trying to figure out how to set the amount of people that spawn in a group. I only want a few AI to spawn at a time. I have it set to one group spawning at a time but sometimes inside that one group I get 15+ guys spawning. How can I set it so there is no more that say 4 guys in a group. sorry if this was already posted. I couldn't find any answers. Thanks Share this post Link to post Share on other sites
spunfin 34 Posted November 18, 2014 AVIBIRD 1, Yeah that sounds pretty reasonable, I hope it now works. :) If you still encounter issues and odd behaviour, you can send files to me straight via this page: http://kaartomedia.com/ShowMe/ drsubo, lines 191 & 192 will decide if infantry group or vehicle group is being spawned. Infantry amount: line 207: _grp = [_spawnPos, _side, [10,3]] call LV_menGroup; - number 10 is max number for random command, and 3 is fixed amount = group size will be 3-13. So you could try something like [2,2] to get group sizes down to 2-4 units. (Actually, I can't remember anymore if random command rounded numbers up or down, but anyways, it will be 2-4 or 2-3 units) Share this post Link to post Share on other sites
jandrews 116 Posted December 8, 2014 In regards to "fillhouse", I was able to change the units from opfor to FIA which is nice, however my main question is regarding the radius. Should I presume that the radius for the below is 500/500? Could you explain more into this? Also, the spawn %, default is 50, is that 50 % of positions will be filled in that radius of 500/500? nul = ["marker",player,2,true,2,50,500,"default",nil,"hint 'careful of rebel patrols';",nil] execVM "LV\fillHouse.sqf"; Share this post Link to post Share on other sites
spunfin 34 Posted December 8, 2014 Should I presume that the radius for the below is 500/500? Could you explain more into this?Also, the spawn %, default is 50, is that 50 % of positions will be filled in that radius of 500/500? nul = ["marker",player,2,true,2,50,500,"default",nil,"hint 'careful of rebel patrols';",nil] execVM "LV\fillHouse.sqf"; Yes that's correct, randomly 50% of all buildingPos' in range of 500m (as in 500m from center point to every direction, so the area is actually 1000m circle) will be used as spawn points. Your line seems to have first parameter twice tho, but it's probably just that you've tested with "marker" and also with player and just forgotten both of them there. Share this post Link to post Share on other sites
jandrews 116 Posted December 8, 2014 Yes that's correct, randomly 50% of all buildingPos' in range of 500m (as in 500m from center point to every direction, so the area is actually 1000m circle) will be used as spawn points. Your line seems to have first parameter twice tho, but it's probably just that you've tested with "marker" and also with player and just forgotten both of them there. Thanks, I am sure a NOOB!. lol Share this post Link to post Share on other sites
spunfin 34 Posted December 8, 2014 Thanks, I am sure a NOOB!. lol Don't worry, so am I. :) Share this post Link to post Share on other sites
justanotherinterestedparty 10 Posted December 10, 2014 Hi, I'm actually trying to make hostile civilians and want them to respawn over a period of time, but they dont seem to respawn with the custom loadout I have given them. Any idea? Share this post Link to post Share on other sites
michaelny 10 Posted December 10, 2014 @spunFIN I did like your script already on wasteland but now we moved to A3 Epoch and hope you can help me a little. They dont seem to attack civilians but Epoch classifies you as such and that cant be changed ..... would you know any way to make your guys do so I want to militarize but only unarmed patrol vehicles and no AA and AT ....... just plain and simple guns, rifles and nades ....... any hint there? Thx Michael Share this post Link to post Share on other sites
RX8Toxic 10 Posted December 11, 2014 First off thank you for your hard work, on this script. Ok to simplify this, I'll explain exactly what I am trying to do. I am currently running Wasteland 1.0b. I want to run militorize.sqf every time a player from a faction captures a territory, the script will run and spawn AI to protect the territory for the team that captured it. ANY help would be greatly appreciated. Thank you for your help in advance!!! -Steve Share this post Link to post Share on other sites
michaelny 10 Posted December 15, 2014 (edited) Hey there, I did install this into my map for A3 epoch altis but no units show up ...... To be honest I am unsure that I did evrything right ...... I only moved the LV Folder into my epoch.altis.pbo ( beside the map editing part of course ) but is there any other place where this needs to go? server or client side? any init.sqf or something else? I did this once under wasteland but for the love of pete I cant recall how I did it . Edited December 15, 2014 by michaelny Share this post Link to post Share on other sites
jandrews 116 Posted December 16, 2014 hey all, so I am trying to use "fillhouse" in triggers so once players enter an area they fill buildings, I am using a 5% and radius 2000m, but am finding that is really causing some lag issues and slowing everything down. So what I would like to know is. Should I either use more triggers with smaller % and radius or ???? What have you guys used. Its on Altis. I also have the trigger set to anybody, once present and {_x in thisList} count (playableUnits + switchableUnits) > 0 FillHouse Fills nearest building, OR all buildings in defined range, with soldiers. You can define side of soldiers, will they patrol or not, how will they patrol (only inside of building or also outside), spawning percentage, area radius, AI skill levels, and other stuff. Share this post Link to post Share on other sites
jshock 513 Posted December 16, 2014 Yea, I would recommend a progressive system of smaller triggers, so split the area up into four chunks (or more), that way (technically speaking) only houses in a 500m radius of the overall radius get filled, then cleared by the players, then the next chunk fires, and is cleared, and so forth, too many AI with waypoints can kill performance. Share this post Link to post Share on other sites
sgtsev3n 12 Posted December 20, 2014 (edited) i love your script, i made world war IV and its awesome and performance friendly even with many AI spawning around you. but i have some ideas you could do, so me and others can do world war V in arma 3: 1. what about an ambient air combat script ? the script spawn mainly jets when u are in the air and the BLUFOR-OPFOR-INDFOR jets fighting each other and you when u are flying with a helicopter or a jet. same as ambient combat you could define which faction jets appear, how many jets at once spawn in the air, min delay spawn, max delay spawn, distance spawn etc... the only hardest part of it would be = to make them spawn only if you are in the air. but if you can´t do that, its no problem when they spawn even if you are on the ground, it would be awesome too. for the rest: i think it wouldnt be hard to do, just copy the ambientcombat script, paste it with a new name and replace all the units that ambient combat spawn, with jets & helicopters and make them spawn in flying mode. 2. could you add a script which let you spawn random convoys near @ you ? just like the ALIVE module had it (but they removed it idk why). and here the define of max amount spawn at the same time, spawn delay etc.. 3. could you add a define for the ambientcombat script which let you define of how many vehicles spawn at the same time ? like on the militarize script, it lets you define of how many vehicles spawn. 4. could you make a trigger version of the militarize script ? so the militarize script spawn units near at you no matter where you go, just like the ambientcombat script. or is it possible to make it as trigger in the editor or via script ? if yes, can you explain how ? 5. could you make a script which spawns random artillery/mortar impacts and CAS support (all types, missle run, gun run, missile & gun run) around you ? where you can define the amount of mortar/artillery impacts and CAS attacks ? the mortar/artillery/CAS attacks could be spawn together when units/vehicles spawn, for example when a group of opfor spawn, then a CAS jet will spawn at the same time and attack the opfor group which spawned at the same time with the group and you could make it that not every group that spawn, will automaticlly attacked by mortars/artillery impacts and/or CAS attacks. example: first time: BLUFOR group spawn, at the same time, artillery will impact where the group spawned second time: a group spawn again, but this time there wont be a artillery/mortar/CAS attack. third time: there could be another attack, but must not be. here is a example script where helis spawn and may crash, you can define there the chance that the helicopter crash and its random, means: first time heli spawn, no crash, second time the heli spawns, there maybe a crash etc: http://forums.bistudio.com/showthread.php?185574-RELEASE-Helicopter-Crash-Script-Scripted-Heli-Flyovers if this isnt possible, could you make the script just spawn random artillery/mortar/CAS attacks around you ? since factions from all 3 sides spawn around you, there could be a chance that the artillery/mortar/CAS attacks hit them and there could be a chance of friendly hits/friendly fire, which is also realistic too. thats all for now. nice work :) Edited December 20, 2014 by sgtsev3n Share this post Link to post Share on other sites
Ion_Tychi 10 Posted December 21, 2014 hey sunfin, is it possible to use assip for caf_ag or rhs and let a group walk in formation? Share this post Link to post Share on other sites
0verlord-actual 11 Posted January 3, 2015 hey, does anyone know if this script works on a dedicated server? I activated the trigger for the zone but no AI spawned in on my server?? I am using the militarize part of the script with the simple cache script? has anyone else got this running on a server? Share this post Link to post Share on other sites
jshock 513 Posted January 3, 2015 Yes, and with no issues. Share this post Link to post Share on other sites
0verlord-actual 11 Posted January 3, 2015 Yes, and with no issues. I cant seem to get it to work :( its making me very sad! this is whats in my activation box: nul = [EXPL_cache,3,200,[true,false],[true,false,false],false,[22,20],[4,3],"default",nil,nil,4] execVM "LV\militarize.sqf" Works fine when I host the mission on my computer but then nothing happens at all when its on our server? pleased help Share this post Link to post Share on other sites
0verlord-actual 11 Posted January 3, 2015 I cant figure out why this would work when I host the mission but not when its on a server? Share this post Link to post Share on other sites