Jump to content

HAFGaming1

Member
  • Content Count

    9
  • Joined

  • Last visited

  • Medals

Community Reputation

0 Neutral

About HAFGaming1

  • Rank
    Private

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hey man either way I appreciate the help 👍👍
  2. idk if there's any meaning with the initPlayerLocal name I tried it and got the same issue so I changed it back to OSK (One Shot Kill) just so I don't get confused later Okay so I'm gonna go with #3 that its an arma thing cause now it's showing that error, but the code is still working... Thanks for having some patients and helping me with that script and replying man... Gotta love the newbies right?
  3. Okay so now I'm confused on what is going on. I can run the scripts and they work. Once I go back into the editor to adjust the mission the script will never work again for that mission. I've restarted the mission, I've restarted the game, I've put "//" in front of the execVM"OSK.sqf"; so it doesnt run it automatically, then try that excVM code in the debug, I've taken the script out of the mission entirely then run the script itself in the debug and clicked server, global, and local execute. No matter what it will only work one time per mission then never work again. Gives me this error...Using script from pierremgi, though it does this with any of the scripts. Am i doing something wrong? Is this just an Arma thing?
  4. Thank you so much, guys! You have no idea how happy I am to get this working! PS. Sarogahtyp, your code works but only when the AI is already placed. Such as if I let the AI spawn, then execute the code, it will work. But the next wave of AI to spawn from the SpawnAI module are not affected, then I have to run the code again. This is useful though because in the editor I would not have to place the code in EVERY unit init expression. Though if my mission spawns any AI it will not work on those ai. Thank you! pierremgi, Your code is 100% what I was hoping for. I don't understand the HAF_spawn thing, I don't know what that tells the computer. but hey it works flawlessly. Thank you! The code only needs to be executed once, and it will affect ALL opfor units. (didn't test for players) MechSlayer, I have not tested your code yet because of my buddies not being online. BUT I feel like I can manipulate this code to make the players take more shots before they die. Not sure, I barely know how to code but makes sense in my head... lol... Thank you!
  5. Man you guys replied faster then I expected, I'm at work now I will try when I get home and give an update. Thanks so much for the help!
  6. this addEventHandler ["HandleDamage", {1}]; so that works perfectly to make a specific unit die in one shot of any weapon...but what if I want to make all opfor units effected by this code? how would I do it? I think I have to run the script through the init folder in my mission because I'm using the SpawnAI module in the editor... so yeah... been searching google for 3 days and I can't figure this out. Long story short I made a quick "capture the tower" style mission for me and my buddies. We are blufor, all the ai are opfor. I need to make all the opfor die after one shot of any caliber no matter where the round hits on the body. I'm using a SpawnAI module to spawn in all AI units so I won't be able to use the code above since the units aren't present in the editor to apply the code in their init... The whole point of this is to have wave after wave of 100s of opfor and they all die in one shot, so we can have a lot of fun.
  7. Sarog Dude I absolutely love people like you. Thank you so much I haven't tested it, though when I get home from work I will. I have one other question that maybe you or someone else could help me with. How could I have this script run using a trigger? Such as nothing spawns until blufor shows up then all the loot spawns into the town you have just entered. When you leave the town all the loot despawns? I'm trying make a zombie survival mission for me and some friends to play but like I said I havent written script in this game in soo long I've forgotten everything I knew.
  8. All credit for script >> https://www.youtube.com/channel/UCLjNP-gJSrn2uTvUAYlFroA Lax on youtube. Lax replied to another person to put an if then line:: if (10 > random 100) then { code }; He says to put the spawning command in the place of "code" which im gonna assume is addWeaponCargoGlobal, though is still spawns in every buildingpos it finds. though i want it to spawn maybe one per building which is why im trying to do a 10% chance of spawning. I also don't know where in the script to put this line. SORRY FOR THE STUPIDITY I HAVE NO CLUE WHAT IM DOING LOL i have messed with scripts before but that was in the alpha of alpha of arma 3 that was a while ago.
  9. Hi everyone! I was able to get a script working to spawn loot. It spawns like 5-6 items per building (so far weapons and mags) and it lags the crap out of my game. (this is within a 100m distance) is there anyway to make it spawn one or two per building so i dont lag as much? also to keep my mission from being to easy to find loot. here is the script:: _unit = _this select 0; _addActionID = _this select 2; _unit removeAction _addActionID; _markerPos = getMarkerPos "lootMarker"; _weaponArray = []; //Automation process _cfgWeapons = "true" configClasses (configFile >> "cfgWeapons"); { _weaponString = configName (_x); _parents = [_x,true] call BIS_fnc_returnParents; if ("Rifle" in _parents) then{ _weaponArray append [_weaponString]; }; if ("Pistol" in _parents) then{ _weaponArray append [_weaponString]; }; } forEach _cfgWeapons; //Automation process _itemBoxArray = []; _houseArray = _markerPos nearObjects ["house",100]; { _buildingPositions = [_x] call BIS_fnc_buildingPositions; { _weapon = _weaponArray select (floor (random (count _weaponArray))); _itemBox = "WeaponHolderSimulated" createVehicle [0,0,0]; _itemBox setPos _x; _itemBox addWeaponCargoGlobal [_weapon,1]; _magazines = getArray (configFile >> "CfgWeapons" >> _weapon >> "magazines"); _mag = _magazines select (floor (random (count _magazines))); _itemBox addMagazineCargoGlobal [_mag,5]; _itemBoxArray = _itemBoxArray + [_itemBox]; } forEach _buildingPositions; } forEach _houseArray; sleep 120; { deleteVehicle _x; } forEach _itemBoxArray;
×