Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Everything posted by Blitzen88

  1. Im trying to create a basic weapon swap script for units that are spawned via the AI Spawn Module. I was hoping I could pull this off by executing a script via the module’s expression field. I tried searching and found some examples but I cant pull it off myself. Can someone tell/show me how to call the script and apply it to the spawned group? Thank you so much!!
  2. Vanilla Units. Only thing I can think of that might mess it up would be the Advanced AI Command mod. However, that mod doesnt cause any issues with weapon attachments when units are spawned via script. Edit I forgot to add that I blacklisted alot of group types. Im not 100% sure but I think units used to spawn with attachments before the blacklist was applied.
  3. How would I implement an approach like this: _unit = ??? _possibleScopes = [ "optic_Arco" ,"optic_Hamr" ,"optic_Holosight" ,"optic_Aco" ]; _randomScope = selectRandom [_possibleScopes]; _unit addPrimaryWeaponItem _RandomScope}; I know its probably full of errors but hopefully it gets my point/approach across...? Thank you so much for your help by the way. I appreciate it! Im also learning too!
  4. From my understanding, thats going to cause issues: 1) The spawned units will copy that loadout and there will be no diversity for scopes. I wanted to define a list of scopes and then have a random selection of the available scopes. That way there is a certain degree of uniqueness in a unit’s loadout. 2) For the Ak12’s, all units will copy the reference unit’s loadout. I do not want machinegunners to have Ak12’s; only riflemen and grenadiers
  5. Two things: 1) For whatever reason, units that are spawned by the AI Spawn Module are stripped of their weapon attachments (scopes and IR lasers). I want to have each unit exec a script that adds those attachments. 2) Sometimes I like to have CSAT use Ak12s. I want a script to remove their current weapon and add an Ak12. I have a general idea how to write/setup the script but I dont know how to call it/apply it.
  6. How would you call a script from the expression field? What would you put there to exec a script for each group member and how would you define the group member in the script?
  7. Thats a great; I just need to know how to call it, etc. Im a moron
  8. Greetings, I’m trying to create a script which will rearm CSAT units with Ak12s. However, I do not want the script to apply to machinegunners and marksmen. Can someone show me how to either: 1) Ignore/do not run the script for machinegunners/marksmen (would this be done be excluding certain unit classnames??) 2) Apply the script to units which are armed with a specific type/array of weapon Thank you!
  9. Im a scripting newbie but wouldn't this resupply the unit instead of changing weaponry? i think something like this is what Im looking for..? //Add LMG for Autorifleman, otherwise give rifle if (_unitType in _MGSoldiers) then { [_unit, (_possibleMGs call Bis_fnc_selectRandom), 6] call BIS_fnc_addWeapon; } else { if (_unitType in _GLSoldiers) then { {_unit addMagazine "1Rnd_HE_Grenade_shell"} forEach [1,2,3,4,5,6]; [_unit, (_possibleGLWeapons call Bis_fnc_selectRandom), 6] call BIS_fnc_addWeapon; } else { if (_unitType in _MarksmanSoldiers) then { [_unit, (_possibleMarksmanWeapons call Bis_fnc_selectRandom), 6] call BIS_fnc_addWeapon; _unit addPrimaryWeaponItem "optic_Hamr"; } else { [_unit, (_possiblePrimaryWeapons call Bis_fnc_selectRandom), 6] call BIS_fnc_addWeapon; }; }; }; [_unit, (_possibleHandguns call Bis_fnc_selectRandom), 4] call BIS_fnc_addWeapon; //Give AT weapon where appropriate if (_unitType in _ATSoldiers) then { [_unit, (_possibleLaunchers call Bis_fnc_selectRandom), 3] call BIS_fnc_addWeapon; }; //Give Medikit to Medics if (_unitType in _MedicSoldiers) then { _unit addItemToBackpack "Medikit"; {_unit addItemToBackpack "FirstAidKit";} forEach [1,2,3,4,5,6,7,8,9,10]; }; //Give Toolkit to Engineers, etc. if (_unitType in _RepairSoldiers) then { _unit addItemToBackpack "ToolKit"; _unit addItemToBackpack "MineDetector"; {_unit addItemToBackpack "FirstAidKit";} forEach [1,2]; };
  10. I didnt know about the unitloadout command. I was wondering if it would be possible to do something along the lines of: If unit class is machinegunner or marksman then exit; else removeweapon, etc
  11. Greetings, Whenever I play Arma I rely heavily on AI spawn scripts for my missions. Generally speaking I like to apply the same skill settings for all of the units in a mission but issues arise when AI units are spawned after the mission starts. My current solution is to use an eventhandler to run an AI skill script whenever a unit is spawned. However, I recently found a script which applies AI skill settings by looping/re-running every 30 seconds or so. Would one method be more efficient (performance wise) than the other?
  12. The 30 second delay doesnt bother me that much. Im still torn as to which method would be more effective. Ultimately it might not matter since I seem to get good performance with what Im using. This question also applies to another issue I have: If I want to re-equip all Csat units with AK 12s would it be better to do that via an event handler or a looping script?
  13. The EH script is a simple SetAIskill # for each all units type of script. The loop script would be This script. I would be using about four eight man squads per side plus three to four vehicles. The EH script would execute around 32 times at mission start and then only when the groups respawn.
  14. Good morning. Im trying to have a trigger repeatedly call a function when the trigger countdown reaches zero. I placed the trigger (with no conditions) with a countdown. The trigger counts down but the function (spawn a helicopter) never activates. I added a condition to the trigger (opfor capturing a sector) and the function activated. However, I want the trigger to activate repeatedly. Even when the condition is met, the function is only called one time. Is there anyway to have a trigger countdown repeatedly and call the function everytime the countdown reaches zero? Thank you
  15. This is what I have so far: Sleep 5; _Vehicle = _this select 0; _VehicleCrew = crew _Vehicle; _LZMrk = _this select 1; _RTB = _this select 2; _WayPoint1 = (group _Vehicle) addWaypoint [getMarkerPos _LZMrk, 0]; _WayPoint1 setWaypointType "TR UNLOAD"; _WayPoint1 setWaypointBehaviour "Aware"; _WayPoint1 setWaypointCombatMode "Yellow"; _WayPoint1 setWaypointSpeed "FULL"; _WayPoint1 setwaypointstatements ["this land 'land'"]; _WayPoint2 = (group _Vehicle) addWaypoint [getMarkerPos _RTB, 0]; _WayPoint2 setWaypointType "MOVE"; _WayPoint2 setWaypointBehaviour "Aware"; _WayPoint2 setWaypointCombatMode "Yellow"; _WayPoint2 setWaypointSpeed "FULL"; _Waypoint2 setWaypointStatements ["true", "{deletevehicle _x} foreach units (group _Vehicle)"]; Im having an issue with the last waypoint: the helicopter is not deleted... Can anyone point me in the right direction? Thanks
  16. Blitzen88

    Alive’s Caching System

    Wow, I had no idea that it did that. That’s pretty cool. Thanks for the explanation!
  17. I play almost all of my missions with the Advanced AI Command mod. As a player I will remotely controll friendly AI units but I also spend time away from the frontlines issuing orders. This style of play can conflict with a lot of caching systems. This conflict arises from the fact that a lot of caching systems will only un-cache a unit when the PLAYER is nearby; the system does not un-cache inits when an enemy AI unit is nearby. Ultimately this leads to a situation where enemy units never spawn in if I am a far distance from the frontlines issuing orders. Does Alive cache units based upon how close/far away a player is or based upon how close/far away an enemy unit is? Thanks!
  18. I think that code only applys to markers with numerical names ie “1, 2, 3” etc
  19. I did some digging and I think Gaia abandoned helicopter transport capability. What patrol script do you use if you dont use gaia?
  20. Has anyone had any success with using transport helicopters with gaia and jebus? According to gaia documentation, transport helicopters are supposed to automatically start transporting groups just like transport trucks, apcs, etc. for whatever reason I cant get transport helicopters to work (attack helicopters work just fine). Anybody have any luck or know of any tricks?
  21. This worked like a charm, thank you! I was unaware of the inArea command!
  22. Greetings, Im using a trigger which is activated whenever Blufor are present. Due to the spawn script that I am using, the trigger needs to be a “Blufor Present” type of trigger. Is there a way to delete all units of a particular side whenever Blufor units leave the trigger area? I looked into using the Deactivation part of the trigger but, per the wiki, it seems like you cant use the “this list” command on trigger deactivation. Does any one know how to do this? Thanks
  23. From my understanding and testing (albeit with an older version) Gaia caches based upon the player’s distance from a cached unit; when a player gets within a specified distance the units spawn. Is there a way to change the system so that units will spawn if any enemy, player controlled or not, travels within the cache distance..?
  24. Greetings everyone, Im trying to modify Jebus' pilot kill function to include more scenarios. Here is what I have: _SubjectVehicle = vehicle (_this select 0); _Vehiclecrew = crew _SubjectVehicle; WaitUntil {!canMove _SubjectVehicle} OR {{_x in _SubjectVehicle} Count (_Vehiclecrew) == 0} OR {!canFire _SubjectVehicle}; {DeleteVehicle _x} foreach _Vehiclecrew; _SubjectVehicle setdamage 1; Im trying to tweak this so that a vehicle and its crew are destroyed when the following conditions are met: The vehicle can no longer move The crew is no longer in the vehicle The vehicle can no longer fire/shoot its gun The vehicle crew has been killed (not listed) I can get one these conditions to work but I cant seem to make all of the conditions work...? Also, does a sleep command need to be added to save performance? Thank you