Jump to content

Casio91Fin

Member
  • Content Count

    203
  • Joined

  • Last visited

  • Medals

Everything posted by Casio91Fin

  1. Casio91Fin

    Heli Troops out

    thanks for that. Other possible fixes you see in this script? But I have done this commands like this is it correct. params ["_MaxActiveAI","_MaxAiTeams","_MissionStartTime","_PossibilityAPC","_PossibilityHeliTroops","_TotalSpawned"]; _MaxActiveAI = "MaxActiveAI" call BIS_fnc_getParamValue; publicVariable "MaxActiveAI"; _MaxAiTeams = "MaxAiTeams" call BIS_fnc_getParamValue; publicVariable "MaxAiTeams"; _MissionStartTime = "MissionStartTime" call BIS_fnc_getParamValue; publicVariable "MissionStartTime"; _PossibilityAPC = "PossibilityAPC" call BIS_fnc_getParamValue; publicVariable "PossibilityAPC"; _PossibilityHeliTroops = "_PossibilityHeliTroops" call BIS_fnc_getParamValue; publicVariable "_PossibilityHeliTroops"; _TotalSpawned = 0; do you have any solution why helicopter not fly after transport unload? @Harzach I have waypoint a ready where helicopter have to go, but that not fly there why?
  2. Hey. How to get attack direction between 120-240 degree angles and get AI attack from those directions and possibly in between I have mostly used the 360 degree method.
  3. Casio91Fin

    Attack direction

    Blacklist area? possible?
  4. Casio91Fin

    Attack direction

    I want the AI to attack from randomly 120-240 directions, but not from 0-119 and 241-359 directions (compass) sometime long ago, someone made a similar script, but it's been a long time and I don't remember where it was, it might have been on Armaholic's website
  5. _MaxActiveAI = 40; _MaxAiTeams = 150; _TotalSpawned = 0; TeamLeaders = ["rhs_msv_officer", "rhs_msv_sergeant","rhs_msv_efreitor","rhs_msv_junior_sergeant"]; Infantry = ["rhs_msv_rifleman","rhs_msv_grenadier","rhs_msv_LAT","rhs_msv_RShG2","rhs_msv_medic","rhs_msv_machinegunner","rhs_msv_grenadier_rpg","rhs_msv_engineer","rhs_msv_arifleman_rpk","rhs_msv_at","rhs_msv_arifleman"]; LightVeh = ["rhsgref_BRDM2_msv","O_G_Offroad_01_armed_F"]; MedVeh = ["rhs_btr60_msv","rhs_btr70_msv","rhs_btr80_msv","rhs_bmp2k_tv"]; HeavyVeh = ["rhs_t72ba_tv","rhs_t80","rhs_t80a"]; while {_TotalSpawned < _MaxAiTeams} do { while {count units east <= _MaxActiveAI - 1 && _TotalSpawned < _MaxAiTeams} do { if (_MaxActiveAI - count units east >= 20) then { for "_x" from 0 to 1 do { New_AI_Team = createGroup [east, true]; AI_Team_Spawn_Pos = [Pos_1, 150, 200, 2, 0, 1] call BIS_fnc_findSafePos; Team_Leader = New_AI_Team createUnit [TeamLeaders select floor (random count TeamLeaders), AI_Team_Spawn_Pos, [], 0, "NONE"]; Team_Leader allowFleeing 0; Team_Leader setSkill (0.75 + random 0.25); Team_leader disableAI "AUTOTARGET"; Team_leader disableAI "MINEDETECTION"; sleep .5; for "_x" from 0 to (2 + (floor random 3 + 2)) do { New_Soldier = New_AI_Team createUnit [Infantry select floor (random count Infantry), AI_Team_Spawn_Pos, [], 0 ,"NONE"]; New_Soldier allowFleeing 0.05; New_Soldier setSkill (0.45 + random 0.35); New_Soldier disableAI "AUTOTARGET"; New_Soldier disableAI "MINEDETECTION"; }; sleep .5; New_AI_Team setBehaviour "COMBAT"; New_AI_Team setCombatMode "RED"; _task = round (random 2); switch (_task) do { case 0: {[New_AI_Team, getposATL Pos_1] call BIS_fnc_taskAttack;}; case 1: {createGuardedPoint [east, Pos_1, -1, objNull]; _wp1 = New_AI_Team addWaypoint [Pos_1, random 120 + 80]; _wp1 setWaypointType "GUARD"; _wp1 setWaypointCompletionRadius 10;}; default {[New_AI_Team, getposATL Pos_1] call BIS_fnc_taskAttack;}; }; _TotalSpawned = _TotalSpawned + 1; }; hintSilent format ["Enemy Team Spawned: %1 / %2", _TotalSpawned, _MaxAiTeams]; }; if (_TotalSpawned >= _MaxAiTeams) then { hint "The last enemy team was born. Find and destroy them. No survivors!"; playmusic "leadtrack02_f_epb"; waitUntil {{alive _x && (side _x) == east} count allUnits == 0}; sleep 1; playSound "Beep"; sleep 1.5; playSound "Beep"; sleep 1.5; playSound "Beep"; sleep 1.5; playSound "Beep"; sleep 1.5; "END1" call BIS_fnc_endMission; }; }; sleep 60; }; How to add a vehicle by choosing one of three different vehicle types at random
  6. Casio91Fin

    Need vehicle group AI for

    true i want to choose random vehicles to AI
  7. I tested this works just fine. put the Game logs inside null = execVM "ReconocimientoDroneV2 .sqf"; and it will work That would be a great thing if "_target_marker" follows the item as well
  8. How do I get the AI to change the flag on the flagpole? And if the color of the flag had been on the flagpole for more than 30 seconds then the game would end (loss)
  9. hey how does the trigger recognize that half of the enemy has died from this area?
  10. Casio91Fin

    50% enemy dead

    Artificial intelligence spawns a random amount on a task and 50% of that x amount should die before something happens.
  11. Hey. how to add parameters to these two points InitServer.sqf waitUntil {time > 10}; _MaxActiveAI = 70; <<< add to this line parameters command _MaxAiTeams = 50; <<< add to this line parameters command _TotalSpawned = 0; TeamLeaders = ["O_G_Soldier_TL_F","O_G_officer_F","O_G_Soldier_SL_F"]; Infantry = ["O_G_Soldier_lite_F","O_G_Soldier_LAT_F","O_G_Soldier_F","O_G_Soldier_M_F","O_G_Soldier_GL_F","O_G_medic_F","O_G_Soldier_AR_F"]; while {_TotalSpawned < _MaxAiTeams} do { while {count units East <= _MaxActiveAI - 1 && _TotalSpawned < _MaxAiTeams} do { if (_MaxActiveAI - count units East >= 21) then { for "_x" from 0 to 1 do { New_AI_Team = createGroup [East, true]; AI_Team_Spawn_Pos = [Pos_1, 500, 1000, 5, 0, 1] call BIS_fnc_findSafePos; Team_Leader = New_AI_Team createUnit [TeamLeaders select floor (random count TeamLeaders), AI_Team_Spawn_Pos, [], 0, "NONE"]; Team_Leader allowFleeing 0; sleep 1; for "_x" from 0 to (5 + (floor random 2 + 1)) do { New_Soldier = New_AI_Team createUnit [Infantry select floor (random count Infantry), AI_Team_Spawn_Pos, [], 0 ,"NONE"]; New_Soldier allowFleeing 0.01; }; sleep 0.5; [New_AI_Team, getposATL Pos_1] call BIS_fnc_taskAttack; _TotalSpawned = _TotalSpawned + 1; systemChat format ["Spawned: %1 / %2", _TotalSpawned, _MaxAiTeams]; }; }; if (_TotalSpawned >= _MaxAiTeams) then { hint "Last Enemy team was spawned. Kill them!"; waitUntil {{alive _x && (side _x) == East} count allUnits == 0}; sleep 5; "END1" call BIS_fnc_endMission; }; }; sleep 60; };
  12. Casio91Fin

    Coop Parameters

    for those that could change numbers. _MaxActiveAI = 70; <<< add to this line parameters command _MaxAiTeams = 50; <<< add to this line parameters command _foley yes i know the site but it didn't help https://community.bistudio.com/wiki/Mission_Parameters 7erra mission parameters i thinks is better
  13. Casio91Fin

    AI to change the flagpole flag?

    unfortunately i need an AI to change the flagpole flag. i know a few commands would exist.
  14. Hello all. I have a problem that should get two items added to the script, but I haven’t succeeded. That is why I am asking for help. DLC = S. O. G. Prairie Fire These two items should be added to the player 1. (vn_m67_grenade_mag) max 4. 2. (vn_b_item_firstaidkit) max 5.
  15. Casio91Fin

    Rearm items

    @_foley thank you it works like a dream 🤗
  16. Does anyone have this "Infantry Occupy House" script and possibly added "JBOY UP & Down" to it? command forms, however, would be like this what I was looking for [Group this, Postion X, radius] ...... simple if possible
  17. Casio91Fin

    player inventory weight script

    When a player opens their own inventory then somewhere in the corner of the inventory would show how much stuff the player is carrying "Kg"
  18. Casio91Fin

    Need Occupation script

    @Fr3eMan thanks for that but it wasn't quite what i was looking for.
  19. The purpose should be to find the "TRANSMITTER" tower on the map and create a task from it. (23 pieces Altis) and of course to choose randomly. nearestTerrainObjects
  20. Casio91Fin

    Find object in map

    thx @Harzach
  21. How could I make this work? _AI_Leader = New_AI_Group createUnit [JalkavakiJohtajat select floor (random count JalkavakiJohtajat), _AI_Spawn_Pos, [], 0, "NONE"]; if (_AI_Leader == "I_officer_F") then {_AI_Leader setRank "LIEUTENANT"; [_AI_Leader, "LIEUTENANT"] call BIS_fnc_setUnitInsignia;}; else they are. _AI_Leader setRank "SERGEANT"; [_AI_Leader, "SERGEANT"] call BIS_fnc_setUnitInsignia;
  22. Casio91Fin

    add Insignia to AI

    i figured out what was the problem if (typeOf _AI_Leader == "I_officer_F") then {_AI_Leader setRank "LIEUTENANT"; [_AI_Leader, "LIEUTENANT"] call BIS_fnc_setUnitInsignia;} else {_AI_Leader setRank "SERGEANT"; [_AI_Leader, "SERGEANT"] call BIS_fnc_setUnitInsignia;};
  23. Is it possible for the AI team to randomly select their own mission? I'm feeling like a terribly long to write the script, because the AI group is created, however, in many cases again. What I’m looking for here AI randomly chooses a task for himself. a list of possibilities for what the AI could do 1. [New_AI_Group_3, _pos_1, 500] call lambs_wp_fnc_taskPatrol; 2.[New_AI_Group_3, _pos_1, 50] call lambs_wp_fnc_taskCamp; 3.[New_AI_Group_3, _pos_1, 50] call lambs_wp_fnc_taskGarrison; 4.[New_AI_Group_3, _pos_1, 50] spawn lambs_wp_fnc_taskCQB; 5.[New_AI_Group_3, _pos_1] call BIS_fnc_taskDefend; 6.[New_AI_Group_3, _pos_1, 1000] call BIS_fnc_taskPatrol; //Jalkaväki for "_x" from 0 to (1 * Multiplier) do { New_AI_Group_3 = createGroup [independent, true]; _AI_Spawn_Pos = [_Pos_1, 40, 160, 10 + random 15, 0, 20, 0] call BIS_fnc_findSafePos; _AI_Leader = New_AI_Group_3 createUnit [JalkavakiJohtajat select floor (random count JalkavakiJohtajat), _AI_Spawn_Pos, [], 0, "NONE"]; _AI_Leader setRank "SERGEANT"; [_AI_Leader, "SERGEANT"] call BIS_fnc_setUnitInsignia; _AI_Leader allowFleeing 0; _AI_Leader setSkill (0.75 + random 0.25); _AI_Leader enableAIFeature ["AUTOTARGET", false]; _AI_Leader enableAIFeature ["RADIOPROTOCOL", true]; _AI_Leader enableAIFeature ["COVER", true]; _AI_Leader enableAIFeature ["PATH", true]; sleep 2; for "_x" from 0 to (2 + (floor random 2 + 3 * Multiplier)) do { _NewAI = New_AI_Group_3 createUnit [JalkavakiSotilaat select floor (random count JalkavakiSotilaat), _AI_Spawn_Pos, [], 0 ,"NONE"]; _AINewRank = selectRandom ["PRIVATE","PRIVATE","PRIVATE","CORPORAL"]; _NewAI setRank _AINewRank; [_NewAI, _AINewRank] call BIS_fnc_setUnitInsignia; _NewAI allowFleeing 0; _NewAI setSkill (0.45 + random 0.55); _NewAI enableAIFeature ["AUTOTARGET", false]; _NewAI enableAIFeature ["RADIOPROTOCOL", true]; _NewAI enableAIFeature ["PATH", true]; _NewAI enableAIFeature ["SUPPRESSION", true]; }; sleep .5; New_AI_Group_3 setBehaviour "AWARE"; New_AI_Group_3 setCombatMode "RED"; [New_AI_Group_3, _pos_1, random 100 + 150] spawn lambs_wp_fnc_taskCQB; };
  24. Casio91Fin

    Random task for AI

    @UnDeaD. i am going to test and yes @mr_centipede is right it must be 6. Thank you, the script is working very well
  25. Casio91Fin

    Help with Custom Loadout

    I don't know if this helps. _magazinePrimary = getArray (configFile >> "CfgWeapons" >> _weaponPrimary >> "magazines"); to _magazinePrimary = getArray (configFile / "CfgWeapons" / _weaponPrimary / "magazines"); Fixed [_x, (selectRandom [ "arifle_MX_F","arifle_Katiba_F","srifle_DMR_01_F","SMG_01_F","arifle_MX_khk_F","arifle_AK12_F","arifle_AKM_F","srifle_DMR_07_blk_F","LMG_Mk200_F","LMG_Zafir_F"]),3] call BIS_fnc_addWeapon;
×