jsmith82
Member-
Content Count
13 -
Joined
-
Last visited
-
Medals
Community Reputation
0 NeutralAbout jsmith82
-
Rank
Private First Class
-
-
Hey all - I’m trying to find a line of code to spawn a bandit. Trying to keep a consistent number of AI alive at all times and if the live count falls beneath my number to check, spawn until we are back to the count. Counting, etc is all set and works fine but my current spawn code throws errors. Below is an example of how I’m checking, executes once a second. In this example if less than 10 alive, spawn a bandit. Would love a push in the right direction. threat = 0; { if (alive _x) then {threat = threat + 1;}} count allUnits; if (threat < 10) then { [_unit] execVM “\ravage\code\scripts\mission\spawn_bandits.sqf”; };
-
Dynamic statistics on “rugged large screen”
jsmith82 replied to jsmith82's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@soldierXXXX thank you so much! This will get me in the right direction and side note, thank goodness this is possible 😂 -
Dynamic statistics on “rugged large screen”
jsmith82 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Before I burn 10 hours chasing my tail, is it possible to show text on the screen of the object “rugged large screen” tv object? I’ve already added custom images to my scenario file, and I can call on those and show them no problem. What I’d like to do is show information about the scenario such as kills, completed missions, game clock, basically a handful of variables I already have and am showing elsewhere. is it possible to show dynamic information, or am I stuck loading static images? Thanks in advance! -
Counting unequipped ammo in inventory
jsmith82 replied to jsmith82's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Interesting observation. I placed only the following code on my player so I could see what is showing up for the handgun in inventory: hint str magazinesAmmoFull player; Loaded guns don’t show up. I took a 6P53 and a clip, put it in my uniform. I could see the string information for the clip. I loaded the clip into the gun, popped the gun in my uniform, the hint disappeared. Just a couple of empty brackets: [] {if (_x isKindOf [‘Pistol’, configFile >> ‘CfgWeapons’]) then {count = count + 1;}} forEach uniformItems player; ^^this counts handguns in the inventory, so I’m feeling like the solution could be count = count + (figure out the ammo in _x). As is tradition, errors everywhere so far but I’m still working at it! Edit: I’m wrong. I hinted _x, it’s only the name of the weapon and has no actual information about the ammo IN the weapon. It’s a lone string. Bummer. -
Counting unequipped ammo in inventory
jsmith82 replied to jsmith82's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Harzach - question for you. Last night I spent a few hours setting the different variables of magazinesAmmoFull trying to get a count of total ammo if the gun(s) is/are loaded, in inventory but not equipped. I played with currentMuzzle, location in general and arg 2. Argument #2 seems like it should be that check, is the ammo loaded in a gun, but altering the check to the following doesn’t error out but also doesn’t return results: (_x #2 == True && _x #3 == -1) Above seemed redundant, given the status of arg 3 so I thought the following was surely a lock but this also did not turn results (tested using a loaded handgun in my uniform): (_x #2 == True && _x #3 == 2) also…. (_x #2 == True && _x #3 == 2 && _x #4 == “Uniform”) I guess I’m misinterpreting what argument 2 is meant for? Or perhaps at the point the ammo is loaded it’s no longer considered ammo so a different approach will have to be taken. Kind of chasing my tail with their description. Is it possible to get a count of ammo, loaded in any gun, but only for guns that are unequipped using this command? #0: String: magazine class name #1: Number: magazine ammo count #2: Boolean: is magazine loaded #3: Number: magazine type: -1 = n/a (default if magazine is not loaded) 0 - grenade 1 - primary weapon mag 2 - handgun mag 4 - secondary weapon mag 4096 - binocular weapon mag 65536 - vehicle mag #4: String: magazine location: "Vest", "Uniform", "Backpack", "" or currentMuzzle if the magazine is loaded -
Counting unequipped ammo in inventory
jsmith82 replied to jsmith82's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thank you both for the replies! Harzach, your code is a really cool approach to a sum if / for each that I have not used before and thank you for sharing! It is working as you intended, counting bullets in the inventory that are sitting in a clip. What's interesting is if a gun is loaded and in my inventory but not equipped, those bullets are not counted. I feel after looking at the command you suggested I can tweak the checks to get the results I want and will share that here (good or bad). Appreciate the help! -
Counting unequipped ammo in inventory
jsmith82 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi all, I'm stumped. Looking to count bullets in my inventory that are not equipped to the primary, secondary or handgun weapon - essentially what is in the uniform, vest and backpack if applicable. All items have a built in command that can be called / checked: uniformMagazines, vestMagazines, backpackMagazines. Any return is an array with 2 items: Name of mag, ammo in mag. So I know I need to loop through each mag within each of the 3 places to check, take the second item returned in the array and add it to a variable. This is where I'm erroring left and right, I can't figure it out. Really would appreciate a nudge in the right direction. To test, I'm just trying to count ammo in my uniform. The rest will add on later once I know what works. Here is my current: private _count = 0; {_count = _count + (_x select 2;)} forEach uniformMagazines player; Thanks in advance for any help provided. -
Loot replenishment is based on a day in the game, so if I have my time sped by 4, every 6 hours. Is there a command that can be called which would force replenish the environment without having to wait for a game day?
-
It is rvg_aiPopulation. Assigning it a numeric variable and its acting accordingly.
-
Hi everyone, In a scenario I’m working on, I’m using Ravage’s Ambient AI and have given the user the ability to adjust an AI presence setting in a custom menu. I’m having issues changing the “Population Factor” of the module via script. After some digging in the main PBO, I feel like this comes down to “aiPopulationFactor_m” or “rvg_aiPopulation”. Despite toying with these variables in my init file (testing by setting the module to 0 population, then trying to change that in init), I’m not getting any results. Is changing the AI population factor possible after the scenario starts?
-
SQF Address Loot Cycle & AI Populator (ravage)
jsmith82 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, I’m using Ravage Ambient AI and Loot for a scenario I’m working on. In my scenario, I allow the user to adjust settings to change the “ai populator” (ravage’s AI multiplier, X Ai to Y units) and I’d like to also allow adjustments of the loot cycle which is a default 24 hours, no module settings to manipulate. As for the presence of AI, I’ve tried using a global variable that is set to a number based on the user’s difficulty selection, and I placed that variable into the Ravage AI module populator parameter hoping the value would suffice, but it doesn’t work and the module clears out the variable replacing it with a zero when you close the module. Next I decided 3 AI modules for 3 difficulties, created 3 Boolean variables, and based on the user setting I’d set the variable for the selected difficulty to true with all others to false so AI module that was functional had the appropriate difficulty set. This kind of worked, but flaked out as I tested changing difficulty throughout a game. Regarding the loot cycle, I’m at a loss on how to force reset. I could speed up environment simulation and will probably do that. Long winded, but here’s the questions: Can you call a command to change Ravage module settings? It seems so logical that based on a choice of the user, I could do something like rvg_AIPopulator = 3; But I can’t find any documentation as such. Likewise for the loot cycle, some rvg_forceLootCycleReset true; Appreciate any help from the ravage pros! -
Counting Cfg Prop Equipment in Inventory
jsmith82 replied to jsmith82's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I found a solution, though it’s not very clean and I don’t understand why “items”, or something that checks uniform + vest + backpack isn’t working. First thing is Item_Keys is actually referenced as “Keys”. This works: //start test = 0; _i = 0; private _i = {_x == “Keys”} count uniformItems player; test = test + _i; private _i = {_x == “Keys”} count vestItems player; test = test + _i; private _i = {_x == “Keys”} count backpackItems player; test = test + _i; hint format [Keys: %1, test]; //end I’m open to more fluid solutions if anyone can help. -
Counting Cfg Prop Equipment in Inventory
jsmith82 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Stumped on this one. In Eden, there are 2 key prop objects that can be placed in a scenario. Equipment>Inventory Items>Keys (Item_Keys) Equipment>Things>Tools>Keys (Land_Key_01_F) I am spawning a set of the inventory usable “Item_Keys” in my scenario, and I’m able to pick them up, but my script is unable to count how many sets of keys I have in inventory. Here is my code, no error, but no results: _i = 0; private _i = {_x == “Item_Keys”} count items player; hint format [Keys: %1, _i]; I’ve used similar scripts to count helmets, guns, magazines but no combination of == TypeOf isKindOf or multiple types to count are turning results. The wiki lists Item_Keys as CfgVehicle Props Equipment. Any ideas what I’m doing wrong, or why these are seemingly unrecognizable?