brink_za
Member-
Content Count
6 -
Joined
-
Last visited
-
Medals
Community Reputation
11 GoodAbout brink_za
-
Rank
Rookie
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
How to limit weapons in the Arsenal of a box?
brink_za replied to gummybear_qc's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi Larrow, I am trying to do a similar thing with side and unit type adjustments on the same object. Unfortunately the side adjustment is made but my unit types are not. What am I missing here? Is there some kind of problem getting the arsenal to detect the "TypeOf player" on client side not server side? If I take away the !isServer then the whole thing doesn't work. I have tested my typeof player and it is definitely the right unit type to satisfy the if check. Been defining all the classes and side whitelists/blacklists for days and I just can't figure this out... #include "arsenalDefines.hpp" // Made by Raz, data entry from Josh, Zissou and stuffed sheep Made on AhoyWorld this script features all magazines, most weapons, Nato backpacks, Nato items, Nato clothes. You may use this on your mission start, please keep us credited! Enjoy. if (!isServer) exitWith {}; private ["_box"]; _box = _this select 0; ["AmmoboxInit",[_box,false,{true}]] call BIS_fnc_arsenal; private _availableItems = [] call derp_fnc_findItemList; _ArsenalUnitTypeFilter = typeOf player; // GENERAL BLACKLISTS _availableItems = (((((((_availableItems - ArsenalWeaponBlacklist) - ArsenalBlacklistedItems) - ArsenalBlacklistedUniforms) - ArsenalBlacklistedHelmets) - ArsenalBlacklistedGlasses) - ArsenalBlacklistedBackpacks) - ArsenalBlacklistedVests); // TEAM BLACKLISTS switch (playerSide) do { //NATO case west: { _availableItems = (((((((_availableItems - ArsenalWeaponBlacklistNATO) - ArsenalBlacklistedItemsNATO) - ArsenalBlacklistedUniformsNATO) - ArsenalBlacklistedHelmetsNATO) - ArsenalBlacklistedGlassesNATO) - ArsenalBlacklistedBackpacksNATO) - ArsenalBlacklistedVestsNATO); }; //CSAT case east: { }; //AAF case resistance: { }; //Civilian case civilian: { }; }; // UNIT WHITE LISTS switch (playerSide) do { //NATO case west: { if (_ArsenalUnitTypeFilter in ATmissileSoldiersNATO) then {_availableItems = (_availableItems + FilterNatoAT);}; }; //CSAT case east: { }; //AAF case resistance: { }; //Civilian case civilian: { }; }; [_box, _availableItems, true] call BIS_fnc_addVirtualItemCargo; [_box, _availableItems, true] call BIS_fnc_addVirtualWeaponCargo; [_box, _availableItems, true] call BIS_fnc_addVirtualBackpackCargo; [_box, _availableItems, true] call BIS_fnc_addVirtualMagazineCargo; // UNIT DEFINITIONS #define ATmissileSoldiersNATO [ \ "B_soldier_AT_F", \ "B_recon_LAT_F", \ "B_soldier_LAT_F" \ ] #define FilterNatoAT [ \ "launch_NLAW_F" \ ] -
Additional BIS_fnc_randomPos Conditions
brink_za replied to brink_za's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks Joe that's one way to do it for sure (if a little less random) and I may yet turn to it if I find no joy here. However, I was thinking more along the lines of using a For loop to 100 or something like this... for "_i" from 1 to 100 do { _position = [[[getMarkerPos currentAO, 500],_dt],["water","out"]] call BIS_fnc_randomPos; _flatPos = _position isFlatEmpty[3, 1, 0.3, 30, 0, false]; while {(count _flatPos) < 1} do { _position = [[[getMarkerPos currentAO, 500],_dt],["water","out"]] call BIS_fnc_randomPos; _flatPos = _position isFlatEmpty[3, 1, 0.3, 30, 0, false]; }; _roughPos = [ ((_flatPos select 0) - 5) + (random 10), ((_flatPos select 1) - 5) + (random 10), 0 ]; _meters = Bunker1 distance _flatPos; if (_meters >= 500) exitWith {}; }; Bunker2 = "Land_BagBunker_Large_F" createVehicle _flatPos; waitUntil { sleep 0.5; alive Bunker2 }; Bunker2 setVectorUp [0,0,1]; Bunker2 allowDamage false; Bunker2 setDir random 360; "Sector2" setMarkerPos _flatPos; Ok well I tested the above out and it seems to work so far. I did it for all 3 bunkers and now they roughly spawn on the four corners of a square. -
Additional BIS_fnc_randomPos Conditions
brink_za posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi guys. I was playing around with BIS_fnc_randomPos to spawn 4 bunkers in an area, but then I realised I need to space them out (somewhat evenly). I'm creating the bunkers sequentially (1,2,3,4) so 1 will be BIS_fnc_randomPos, 2 would be BIS_fnc_randomPos and a condition to not be close to 1 by Xm, 3 would be BIS_fnc_randomPos and a condition to not be close to 1 and 2 by Xm etc. I'm not really sure that's the best method, but that's how I'm thinking it through at present. It was quite an achievement for me to just get the 4 bunkers to spawn randomly with detection triggers for capture ok don't expect too much ^_^ I'm pretty stumped after starting at the wiki trying to figure out how I can add conditions to this function... Here's what I have thus far. It's pretty much a brute force because I don't have lots of experience with scripting and just wanted to see it work quick. Is there a way I could get the {} code part of BIS_fnc_randomPos to do this even dispersion for me? Otherwise I suspect I will need to loop outside the function to satisfy this extra condition(s)? If you could point me in the right direction I would appreciate greatly. I'm sure I'm over complicating it and someone else has done this ezpz a thousand times. The source of the code comes from I&A radiotower spawn they deserve the credit :D I am most definitely not capable of getting this far on my own so yeah... // Spawn Sector Control Points // CREATE MORE LOGICAL/EVEN DISPERSION OF BUNKERS? // 1 _position = [[[getMarkerPos currentAO, 500],_dt],["water","out"]] call BIS_fnc_randomPos; _flatPos = _position isFlatEmpty[3, 1, 0.3, 30, 0, false]; while {(count _flatPos) < 1} do { _position = [[[getMarkerPos currentAO, 500],_dt],["water","out"]] call BIS_fnc_randomPos; _flatPos = _position isFlatEmpty[3, 1, 0.3, 30, 0, false]; }; _roughPos = [ ((_flatPos select 0) - 5) + (random 10), ((_flatPos select 1) - 5) + (random 10), 0 ]; Bunker1 = "Land_BagBunker_Large_F" createVehicle _flatPos; waitUntil { sleep 0.5; alive Bunker1 }; Bunker1 setVectorUp [0,0,1]; Bunker1 allowDamage false; "Sector1" setMarkerPos _flatPos; // 2 _position = [[[getMarkerPos currentAO, 500],_dt],["water","out"]] call BIS_fnc_randomPos; _flatPos = _position isFlatEmpty[3, 1, 0.3, 30, 0, false]; while {(count _flatPos) < 1} do { _position = [[[getMarkerPos currentAO, 500],_dt],["water","out"]] call BIS_fnc_randomPos; _flatPos = _position isFlatEmpty[3, 1, 0.3, 30, 0, false]; }; _roughPos = [ ((_flatPos select 0) - 5) + (random 10), ((_flatPos select 1) - 5) + (random 10), 0 ]; Bunker2 = "Land_BagBunker_Large_F" createVehicle _flatPos; waitUntil { sleep 0.5; alive Bunker2 }; Bunker2 setVectorUp [0,0,1]; Bunker2 allowDamage false; "Sector2" setMarkerPos _flatPos; // 3 _position = [[[getMarkerPos currentAO, 500],_dt],["water","out"]] call BIS_fnc_randomPos; _flatPos = _position isFlatEmpty[3, 1, 0.3, 30, 0, false]; while {(count _flatPos) < 1} do { _position = [[[getMarkerPos currentAO, 500],_dt],["water","out"]] call BIS_fnc_randomPos; _flatPos = _position isFlatEmpty[3, 1, 0.3, 30, 0, false]; }; _roughPos = [ ((_flatPos select 0) - 5) + (random 10), ((_flatPos select 1) - 5) + (random 10), 0 ]; Bunker3 = "Land_BagBunker_Large_F" createVehicle _flatPos; waitUntil { sleep 0.5; alive Bunker3 }; Bunker3 setVectorUp [0,0,1]; Bunker3 allowDamage false; "Sector3" setMarkerPos _flatPos; // 4 _position = [[[getMarkerPos currentAO, 500],_dt],["water","out"]] call BIS_fnc_randomPos; _flatPos = _position isFlatEmpty[3, 1, 0.3, 30, 0, false]; while {(count _flatPos) < 1} do { _position = [[[getMarkerPos currentAO, 500],_dt],["water","out"]] call BIS_fnc_randomPos; _flatPos = _position isFlatEmpty[3, 1, 0.3, 30, 0, false]; }; _roughPos = [ ((_flatPos select 0) - 5) + (random 10), ((_flatPos select 1) - 5) + (random 10), 0 ]; Bunker4 = "Land_BagBunker_Large_F" createVehicle _flatPos; waitUntil { sleep 0.5; alive Bunker4 }; Bunker4 setVectorUp [0,0,1]; Bunker4 allowDamage false; "Sector4" setMarkerPos _flatPos; -
Real Weather - dynamic weather for MP games
brink_za replied to code34's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi code34. I recently tried your script and am liking it very much thank you for sharing it. However, I do have some issues... 1. it is seems to almost always be raining and overcast is there a way to set the chance for rain/clouds? Ideally I would like 70% clearish and 30% some cloudy/rainy type of weather randomisation. 2. also my start weather is clear but it always starts randomised (and therefore very often cloudy)? I have set all the mission parameters to manual... 3. it seems to rain when there are not enough clouds to justify it? Sorry but I'm not very clued up on scripting, I just edit at a very basic level and you may have already included this type of functionality without me knowing it's there... -
How to use Virtual Arsenal like the Virtual Ammobox System?
brink_za replied to Frankdatank1218's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I believe it needs to be run by the server. i.e. if (!isServer) exitWith {}; -
How to use Virtual Arsenal like the Virtual Ammobox System?
brink_za replied to Frankdatank1218's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello guys. I don't want to use the BIS AddAction. I have whitelisted some items according to team with switch playerside do. My issue is that despite sending the parameter to not use the default BIS AddAction at the spawn fnc and at the additemfnc levels, I don't get the actual Arsenal to open. I've tested and it works fine when I don't try and remove the AddAction (i.e. true,{true} -- and -- true,true) but then I'm back to where I started with their AddAction and no way to customise it in terms of colour, priority etc. I am calling the Virtual Arsenal script from a custom AddAction on an ammobox. from my addaction on the ammobox this addAction ["<t color='#ff1111'>BIS Arsenal</t>","scripts\OpenVirtualArsenal.sqf"]; from my script to open Virtual Arsenal ["AmmoboxInit",[_vabox,false,{false}]] spawn BIS_fnc_arsenal; then I define the contents according to side (I left the switch and classnames out for this post). [_vabox, [ << MY BACKPACKS >> ], false, false ] call BIS_fnc_addVirtualBackpackCargo; then I repeated that second bit for magazines, weapons etc. and side Apparently it's code in the first snippet and boolean in the second to control the addaction by parameter :huh:. Any clue what I'm doing wrong here to not be able to open the Virtual Arsenal when rejecting the add action given to me by default? I'm actually considering overhauling all my addactions to "accommodate" the inability to customize the add action given by default. Why u do dis BIS...