Jump to content

meatball

Member
  • Content Count

    734
  • Joined

  • Last visited

  • Medals

Everything posted by meatball

  1. meatball

    Headless client Setup

    I've had really good luck with elec's old HC script for A2. There's no transfer of AI if the HC crashes, but I've yet to have that happen in mid mission.
  2. Awesome! Great work Na_Palm! I'll be taking a look at it soon.
  3. I've written up a script that goes through and pulls random items from a players inventory. The script is working, but it's throwing a bunch of "Error Zero divisor" errors in the rpt. Here's an example block of code: if ((count vestitems player) > 0) then { for "_i" from 0 to (count vestitems player) do {_randLost = random 5; if (_randLost >= 3) then { if (isClass(configFile >> "CfgMagazines")) then { player removeMagazine ((vestitems player) select _i); } else { if (isClass(configFile >> "CfgWeapons")) then { player removeweapon ((vestitems player) select _i); } else { player removeitem ((vestitems player) select _i); }; }; }; }; }; And then in the rpt I see a whole lot of these: Error in expression <ayer removeMagazine ((vestitems player) select _i); } else { if (isClass(configF> Error position: <select _i); } else { if (isClass(configF> Error Zero divisor Like I said, the script does work correctly, I'd just like to figure out why it's tossing all those errors into the report and see if I can make the script cleaner.
  4. Well hot diggety, adding that in did the trick. Thanks a ton Na_Palm! I swear, something I just scratch my head at what works and what doesn't :)
  5. Alright, so I've run up into a bit of a weird issue with a related script. So, basically what I'm doing is the players get on an AI chopper, it gets shot down and they get tossed out, losing some gear (the script above). The rest of the script I wrote swaps out their backpack for a chute, then on landing swaps the chute back for their backpack. The problem is that it seems to work fine, unless...the player role starts with a default gear loadout in their pack. If that player pulls out any (or all) of the default backpack gear and sticks other stuff in, they'll end up on the ground not only with some of the new gear they put back in, but _all_ of the gear from the original loadout. I've tried a bunch of different commands, but can't seem to get anything to work. Anyone have any thoughts on the following script? // Run loseGear script loseGear = execVM "miscScripts\loseGear.sqf"; waitUntil {scriptDone loseGear}; // Throw the player out of the chopper. moveout player; _gear = []; _backpack = backpack player; _backpack2 = unitbackpack player; _backpack_items = getItemCargo (unitBackpack player); _backpack_weap = getWeaponCargo (unitBackpack player); _backpack_mags = getMagazineCargo (unitBackpack player); _gear = [_backpack_items,_backpack_weap,_backpack_mags]; // Remove Backpack & add steerable chute 3 fadeSound 0.15; removeBackpack player; sleep 1.5; player addBackpack "B_Parachute"; deleteVehicle _backpack2; waitUntil {isTouchingGround player}; // Take off parachute removeBackpack player; // Replace backpack and contents. if (_backpack == "") exitWith{}; player addbackpack _backpack; // Add items back into backpack from _gear array if (count ((_gear select 1) select 0) > 0) then { for "_i" from 0 to (count ((_gear select 1) select 0) - 1) do { (unitBackpack player) addweaponCargoGlobal [((_gear select 1) select 0) select _i,((_gear select 1) select 1) select _i]; }; }; if (count ((_gear select 2) select 0) > 0) then { for "_i" from 0 to (count ((_gear select 2) select 0) - 1) do { (unitBackpack player) addMagazineCargoGlobal [((_gear select 2) select 0) select _i,((_gear select 2) select 1) select _i]; }; }; if (count ((_gear select 0) select 0) > 0) then { for "_i" from 0 to (count ((_gear select 0) select 0) - 1) do { (unitBackpack player) addItemCargoGlobal [((_gear select 0) select 0) select _i,((_gear select 0) select 1) select _i]; }; };
  6. Awesome! Thanks Banga, and thanks for the great script!
  7. How rough is nearestEntities on server/client resources if you used it in a trigger? For example, say you wanted to watch a goat population for some reason, I was thinking you could set up a site and then simply add something like this into the trigger condition: count (goatSite nearEntities ["Goat_random_F",30]) <= 10; Just don't know if that'll clobber the machine running the trigger check :)
  8. Wondering if it's possible in any way to interact with units that are autocreated by the sites modules in any way through scripting. For example, counting the total, checking the number alive, etc? There is an init field, but it doesn't look like the engine handles those groups of auto created units the same as normal. For example, let's say I create a Blufor Observation Post Site module on my map which usually spawns 4 guys. In the init field I put "siteGuys = group this". Start the mission and the 4 Blufor units spawn as expected on the spot. But if I try doing a "units siteGuys" I get "[bIS_uniqueSite0]" as the array returned. If I try to "count siteGuys", I get only 1 for the count even though there's 4 guys. Any thoughts?
  9. Agreed, I've seen the same thing with AI Spawn Script Pack as well. While it's definitely not limited to EoS, it's still an issue that would need to be addressed by that script itself. When most of these scripts create/cache AI and vehicles they use an array to track the unit names at spawn so it can then reference the same name at despawn. Problem is, if a player swipes a vehicle, that vehicle is still sitting in the array of 'spawned' AI vehicles and nothing ever tells it to remove that vehicle from the array. So, when despawn happens, the vehicle goes with it. So, while I know what's going on, every script/mod stores the AI/vehicles in different places/arrays, so there's no way that I can think of to write a script that would fix the issue across the board. So, unless it's built into the script to (1) recognize that the players actually got into one of the spawned vehicles, and (2) pull that vehicle out of the scripts arrays so it doesn't get despawned, it'll be a problem :) I would think it could be addressed by just a couple of lines of code, but it's a matter of where to put that code, and what variables/arrays need to be referenced for that specific script.
  10. Hmm, question to everyone. Has anyone discovered a way to stop vehicles from despawning if hijacked by players? Basically if EoS spawns AI with a vehicle, and the players either disable the drivers/passengers or the drivers/passengers abandon the vehicle and the players hop in, the vehicle will still despawn (even if the players are currently driving it) when the players move out of the original spawn range for that zone. Doesn't happen often, but happens enough that it throws things off. Even had a few players die when driving 70 kph and their vehicle despawned out from under them...
  11. Try testing it on a dummy map and see if you see anything different. Open up the editor, drop down an explosive specialist and a crate next to a gas station or power line and see if you can take them down any faster. Could be something in the mission, but I didn't make any changes to anything other than pre-damaging some structures to make them easier to knock out :)
  12. I'll double check that one, but I do know demo charges suck nowadays and it may just be how BI has balanced stuff and the way it is. You need almost 3 of them to match the same power as 1 satchel charge, and both of those don't do a ton of damage anymore. You will need probably 3-4 charges for power lines, and that's with the mission forcing them to be heavily pre-damaged. 2-3 charges should blow up a pump, but it will usually only blow up one pump and leave the others untouched (even while fire rages around them...)
  13. Which gas station? I'd like to test it again then because I've blown up the pumps with everything ranging from explosives to automatic rifle fire in the past :)
  14. meatball

    @A3MP - ArmA 3 Map Pack

    Great stuff. I assume the Addon pack is still required as a standalone expansion if you wish to use any of those other maps, or is the addon pack functionality built into 1.4?
  15. Just this over and over again... Error in expression < >> "CfgMagazines" >> (vestitems player select _i))) then { player removeMagazin> Error position: <select _i))) then { player removeMagazin> Error Zero divisor File C:\Users\mb\Documents\Arma 3 - Other Profiles\Meatball\mpmissions\[Co-08]_Babel.clafghan\miscScripts\loseGear.sqf, line 52 Error in expression < >> "CfgMagazines" >> (vestitems player select _i))) then { player removeMagazin> Error position: <select _i))) then { player removeMagazin> Error Zero divisor File C:\Users\mb\Documents\Arma 3 - Other Profiles\Meatball\mpmissions\[Co-08]_Babel.clafghan\miscScripts\loseGear.sqf, line 52 Error in expression <> "CfgMagazines" >> ((vestitems player) select _i))) then { player removeMagazin> Error position: <select _i))) then { player removeMagazin> Error Zero divisor File C:\Users\mb\Documents\Arma 3 - Other Profiles\Meatball\mpmissions\[Co-08]_Babel.clafghan\miscScripts\loseGear.sqf, line 52 Error in expression <> "CfgMagazines" >> ((vestitems player) select _i))) then { player removeMagazin> Error position: <select _i))) then { player removeMagazin> Error Zero divisor ---------- Post added at 17:43 ---------- Previous post was at 17:34 ---------- Well, there you go, thanks guys! That cleared up all the errors. Here's the 'final' script. // Lose Random Items Script v 0.2 // By Meatball // Coding Insight from Na_Palm, Grumpy Old Man & Das Attorney private ["_delListU","_delListB","_delListV","_randWpn","_randLost"]; _randWpn = floor (random 3); if (_randWpn == 0) then { if (primaryweapon player != "") then { player unassignItem (primaryweapon player); player removeWeapon (primaryweapon player); }; } else { if (_randWpn == 1) then { if (secondaryweapon player != "") then { player unassignItem (secondaryweapon player); player removeWeapon (secondaryweapon player); }; player removePrimaryWeaponItem "optic_Arco"; player removePrimaryWeaponItem "optic_ACO_grn"; } else { if (handgunweapon player != "") then { player unassignItem (handgunweapon player); player removeWeapon (handgunweapon player); }; player removePrimaryWeaponItem "optic_Arco"; player removePrimaryWeaponItem "optic_ACO_grn"; }; }; _delListU = []; for "_i" from 0 to (count uniformitems player - 1) do {_randLost = random 5; if (_randLost >= 3) then { _delListU set [count _delListU, ((uniformitems player) select _i)]; }; }; { if (isClass(configFile >> "CfgMagazines" >> _x)) then { player removeMagazine _x; } else { if (isClass(configFile >> "CfgWeapons" >> _x)) then { player removeweapon _x; } else { player removeitem _x; }; }; }forEach _delListU; _delListV = []; for "_i" from 0 to (count vestitems player - 1) do {_randLost = random 5; if (_randLost >= 3) then { _delListV set [count _delListV, ((vestitems player) select _i)]; }; }; { if (isClass(configFile >> "CfgMagazines" >> _x)) then { player removeMagazine _x; } else { if (isClass(configFile >> "CfgWeapons" >> _x)) then { player removeweapon _x; } else { player removeitem _x; }; }; }forEach _delListV; _delListB = []; for "_i" from 0 to (count backpackitems player - 1) do {_randLost = random 5; if (_randLost >= 3) then { _delListB set [count _delListB, ((backpackitems player) select _i)]; }; }; { if (isClass(configFile >> "CfgMagazines" >> _x)) then { player removeMagazine _x; } else { if (isClass(configFile >> "CfgWeapons" >> _x)) then { player removeweapon _x; } else { player removeitem _x; }; }; }forEach _delListB;
  16. Ah...I see. I think that's close, but I'm still seeing an zero divisor error on the first isClass check line in this updated one: if ((count vestitems player) > 0) then { for "_i" from 0 to (count vestitems player - 1) do {_randLost = random 5; if (_randLost >= 3) then { if (isClass(configFile >> "CfgMagazines" >> ((vestitems player) select _i))) then { player removeMagazine ((vestitems player) select _i); } else { if (isClass(configFile >> "CfgWeapons" >> ((vestitems player) select _i))) then { player removeweapon ((vestitems player) select _i); } else { player removeitem ((vestitems player) select _i); }; }; }; }; }; ---------- Post added at 17:24 ---------- Previous post was at 17:17 ---------- I think I might have an idea of what's happening though... Let's say there's 5 items in the array. So it'll loop through the if block 5 times. Say the second item gets dropped, now the array only has 4 items, by the time the loop gets up to the fifth go around (_i = 4), that array item is gone.
  17. meatball

    =BTC= Revive

    Think I figured out what I needed. Basically if you set the mission to disable respawn (BTC_disable_respawn = 1) the player will drop 'unconscious' when they take enough damage to die and sit in the waiting for revive state up until BTC_revive_time_max runs out. But at that point the players do still get the Respawn menu and can respawn. What I wanted to do (and think I've figured out), is that the player goes down, waits for revive and if the max revive time runs out, they get rescued by a 'friendly local' and respawn at a random point within 500m of where they were waiting to revive (minus almost all their gear). I was able to get everything to work by editing the BTC_player_respawn function to capture the players actual position at the beginning of the function and then right before they are supposed to respawn I run an outside script that I pass that location to that randomizes their location and strips out most of their gear. Was just having trouble tracking down exactly where I needed to place that and how to get the correct player position :)
  18. meatball

    AI Spawn Script Pack

    Hey guys, quick question as an issue run into with a piece of the scripts and wondering if anyone has tracked down a fix/answer to it. Using any of the scripts that spawn vehicles with simpleCache, Militarize or Ambient Combat for example, if the players can somehow hijack a vehicle from the AI the vehicle will still despawn after a while, even if the players are in the vehicle. Has anyone figured out a way to have vehicles no longer subject to cahcing/despawning if players get in them?
  19. @ Kai Glad you enjoyed it! As for your questions. - As of right now there's nothing that can be done about the snow crash bug as it's a particle bug in the game engine. I am releasing a new version shortly that snow has been removed. - Hadn't thought about making the mission persistent. For sure there's likely no way anyone has the time or motivation to finish the mission all in one go, but my original concept was that players would be able to replay it multiple times and just hit whatever missions they felt like doing that session. That's why I added in the multiple spawn points. I'll look into it, but it might be some time as I have a few other projects going on at the moment. @all - As for those other projects, I've got two other missions in the works, both of which will tie into Force Recon (with a slightly revised storyline for FR). Force Recon will be 'episode 1' if you will and the other missions are in progress right now. :)
  20. meatball

    =BTC= Revive

    Quick question. What variable stores the location of the player when they are 'down' and awaiting revive?
  21. I've got a mission where the players get separated at one point and shouldn't know where each other is. Using server difficulty settings I've been able to disable the markers on friendlies and the team lead, but I can't seem to get rid of the fact that the players always seem to have a waypoint pointing back to the team leads position. As in, they get the hint on their screen corners the direction and distance the team lead is from them. Anyone know how to completely disable any hints/markers that show the team any information about other team members?
  22. I could, but I want them to see their maps. Point is they have to actually use their compass and do some orienteering :)
  23. Yeah, unfortunately. I've got difficulty set to Veteran and everything disabled except for Camera Shake, Net Stats and Weapon Cursor. I've also noticed that even though the player's own marker doesn't show on the map, the two big NS/EW crosshair lines that go across the entire map are still visible and show where are. All I want is for players to not be able to see where they or anyone else is on the map. Sometimes doing the simplest things are so hard...
  24. Nope...I've tried and I can't do that either. Breaks BTC revive (and a lot of other revive scripts). :)
  25. No dice. Tried adding in "setGroupIconsVisible [false,false];" to my init.sqf, but if you open up the map and then close it, you still get the 'waypoint' marker on your main viewscreen showing you the direction and distance to the group leader.
×