Jump to content

mikie boy

Member
  • Content Count

    664
  • Joined

  • Last visited

  • Medals

Everything posted by mikie boy

  1. in recruitInit.sqf - comment out the line ExecVM "FOCKRecruitAI\RecruitAction.sqf"; and change it for an addaction on whatever NAMED object you wish... e.g a flag named baseFlagPole baseFlagPole addAction [("<t color=""#66FFFF"">" + ("Group/Recruit Menu") +"</t>"), "FOCKRecruitAI\RecruitMenu.sqf",[],1,false,true]; doing it this way allows for the parameter of switching it off or on to still work.
  2. have you checked the parameters in the description file. ensure they are in the correct order and have been amended for both programs. the params for ins could be those which the group management script is receiving
  3. sounds like an issue with the aasoldier function being called/spawned. check that the function file is being preloaded so that it can be spawned via the gui section of the script.
  4. can always use eventhandlers vehicle init _vehicle addEventHandler ["GetIn", "if (player == (_this select 2)) then {[_this select 2, _this select 0] spawn whatEverYouWant;}"]; and then getout addeventhandler whatEverYouWant function - whatEverYouWant { _playerDriver = _this select 0; //passed player _VehEntered = _this select 1; // passed vehicle player got in _driver= assignedDriver _VehEject; // returns the assigned driver of vehicle _playerDriver addAction ["do stuff","dostuff.sqf"]; //or put your code in the addaction };
  5. Nice work on that - would be interested to hear more on the subject - again nice work
  6. the script is called on a dedicated server - tested and works - what you seem to have a problem with is the actual clothing working.... this is as Kuskluk stated - i dont think you can use the uniforms on the opposite team. therefore best suggestion is to switch a player to a civilian unit, but that is a bit more complex.
  7. best way to tackle this is using addeventhandler - killed and respawn when player dies you can make it so that it appears he is just unconscious - then invoke the eventhandler to call your heal script. that way there is no auto revive. not really messed around with new animations sorry so not sure how to call them correctly. If i get a chance ill see if i can knock up a quick script to demonstrate the eventhandlers - in the meantime if you dont understand eventhandlers then check out the wiki page. I think in chapter 3 of my tutorials (click on my sig) there is stuff on evethandlers - basic but gives you an understanding
  8. Sorry my bad - i really didnt check your code thoroughly and worse still, i didnt check that which i provided you Tested below and it works :) init of players that can be healed (done via editor) DRRevive = [this] execVM "DRRevive.sqf"; DRRevive.sqf private ["_unitPlayer"]; _unitPlayer = _this select 0; while {true} do { waituntil {damage _unitPlayer > 0.5}; [_unitPlayer] execVM "injured.sqf"; waituntil {damage _unitPlayer <= 0.5}; }; injured.sqf _unitPlayer = _this select 0; _unitPlayer allowDamage false; _unitPlayer playMove "AinjPpneMstpSnonWrflDnon_rolltoback"; sleep 3; _unitPlayer playMove "AinjPpneMstpSnonWrflDnon_InhuredHealed"; _unitPlayer DisableAI "MOVE"; _unitPlayer addAction ["Revive", "Heal.sqf", nil, 6, true, true, "", "(_target distance _this) < 2"]; heal.sqf _wounded = _this select 0; _medic = _this select 1; _actionId = _this select 2; //medic does his bit - person who activated the script _medic playAction "Medic"; sleep 3; //wounded person - the person with the addaction applied to him _wounded setDamage 0; sleep 2; _wounded playMove "AinjPpneMstpSnonWrflDnon_rolltofront"; sleep 3; _wounded playMove "AmovPpneMstpSrasWrflDnon_AmovPercMstpSrasWrflDnon"; _wounded setCaptive false; _wounded allowDamage true; _wounded removeAction _actionId; those animations for the healing were working - and i couldnt be bothered to work out the correct command - sorry - but least its working Mike
  9. in the init of all those players you wish to allocate the revive to - place this... DRiseRevive = [] execVM "DRRivive.sqf"; DRRivive.sqf _unitPlayer = _this; while {true} { _damage = damage _unitPlayer; waituntil {_damage > 0.5}; [unitPlayer] execVM "injured.sqf"; waituntil {_damage <= 0.5}; }; Injured.sqf _unitPlayer = _this; _unitPlayer allowDamage false; _unitPlayer playMove "AinjPpneMstpSnonWrflDnon_rolltoback"; sleep 3; _unitPlayer playMove "AinjPpneMstpSnonWrflDnon_InhuredHealed"; _unitPlayer DisableAI "MOVE"; _unitPlayer addAction ["Revive", "Heal.sqf", nil, 6, true, true, "", "(_target distance _this) < 2"]; Heal.sqf _wounded = this select 0; _medic = this select 1; _actionId = this select 2; //medic does his bit - person who activated the script _medic playmove "Acts_TreatingWounded_in"; sleep 3; _medic playmove "Acts_TreatingWounded01"; sleep 5; _medic playmove "Acts_TreatingWounded02"; sleep 8; _medic playmove "Acts_TreatingWounded03"; sleep 9; _medic playmove "Acts_TreatingWounded_Out"; sleep 4; //wounded person - the person with the addaction applied to him _wounded setDamage 0; sleep 2; _wounded playMove "AinjPpneMstpSnonWrflDnon_rolltofront"; sleep 3; _wounded playMove "AmovPpneMstpSrasWrflDnon_AmovPercMstpSrasWrflDnon"; _wounded setCaptive false; _wounded allowDamage true; _wounded removeAction _revive; Not tested but appears to be a reasonable way of doing it
  10. try that... init.sqf if !(isServer) then { { if (side _x == opfor) then { nil1 = [_x] execVM "civguise.sqf"; }; }forEach allunits; }; civguise.sqf _unit = _this select 0; hint "disguise called"; _civ_clothes = ["U_IG_Guerilla1_1", "U_IG_Guerilla2_1", "U_IG_Guerilla2_2", "U_IG_Guerilla2_3", "U_IG_Guerilla3_1", "U_IG_Guerilla3_2", "U_IG_leader"]; _civ_hats = ["H_Shemag_khk", "H_Shemag_tan", "H_Shemag_olive"]; _vests = ["V_Rangemaster_belt", "V_TacVest_brn", "V_BandollierB_cbr"]; // Remove original equipment removeAllWeapons _unit; removeUniform _unit; removeHeadgear _unit; removeVest _unit; removeBackpack _unit; _unit unassignItem "NVGoggles_OPFOR"; _unit removeItem "NVGoggles_OPFOR"; // Add vest and clothing _vest_item = _vests call BIS_fnc_selectRandom; _unit addVest _vest_item; _cloth_item = _civ_clothes call BIS_fnc_selectRandom; _unit addUniform _cloth_item; // Random integer, if 1 instead of 0, add a random item from the array if(round (random 1) == 1) then { _hat_item = _civ_hats call BIS_fnc_selectRandom; _unit addHeadgear _hat_item; }; // Random weapon loadout switch (round(random 7)) do { case 0: { _unit addMagazines ["30Rnd_556x45_Stanag", 8]; _unit addWeapon "arifle_TRG20_F"; }; case 1: { _unit addMagazines ["30Rnd_65x39_caseless_green", 8]; _unit addWeapon "arifle_Katiba_F"; }; case 2: { _unit addMagazines ["30Rnd_556x45_Stanag", 8]; _unit addWeapon "arifle_TRG20_F"; }; case 3: { _unit addMagazines ["30Rnd_65x39_caseless_green", 8]; _unit addWeapon "arifle_Katiba_F"; }; case 4: { _unit addMagazines ["30Rnd_556x45_Stanag", 8]; _unit addWeapon "arifle_TRG20_F"; }; case 5: { _unit addMagazines ["30Rnd_65x39_caseless_green", 8]; _unit addWeapon "arifle_Katiba_F"; }; case 6: { _unit addBackpack "B_FieldPack_ocamo"; _unit addMagazines ["150Rnd_762x51_Box_Tracer", 5]; _unit addWeapon "LMG_Zafir_F"; }; case 7: { _unit addBackpack "B_Carryall_ocamo"; _unit addMagazines ["16Rnd_9x21_Mag", 6]; _unit addMagazines ["RPG32_F", 5]; _unit addWeapon "hgun_Rook40_F"; _unit addWeapon "launch_RPG32_F"; }; }; _unit addMagazine "HandGrenade";
  11. _ammo addAction ["<t color=#ff1111'>Virtual Ammobox</t>", "VAS\open.sqf];
  12. Correct i havent got round to the multiplayer scripting yet - time is a killer at the mo, but since you have only been scripting for a day or so - i suggest jumping into MP just now is a bit too eager. Its a little more complex than first thought. for what you have written, the script can run on all computers at start - including the server - so first thing would be to stop the server needing to run the script because it is not a player and the objective to find nearest enemy is not necessary. Therefore you would have !isserver boolean check... With this in place when the server runs this script it will simply not run it - however - those clients on a dedicated server (not host) would run that script. Player can be a funny old command. Yes every player is a player, but when the game is running on a MP server- the player can change. Thus the easiest way is to call that one script from each init of the player (for basic level of scripting and does not require the !isserver check). so now you have one script - that can be accessed by many - however you want to get rid of the player and replace with the player's(client) object that is calling the script - (something like this in players init - dude = [] execVm "detect.sqf";) detect.sqf _me = _this; //for a basic understanding - _this is the player calling the script while {true} do { _myGroup = group _me; _myNearestEnemy = (units _myGroup select 0) findNearestEnemy _me ; hint _myNearestEnemy; sleep 1; }; Unfortunately i havent tested the above and its a quick example. Havent done scripting for a while and a bit rusty - but hopefully you will get the idea. There are many ways round and with the player command, much of which folks will guide you on this forum. Yet this is fairly basic stuff and covering the basics will make the MP stuff a little easier for you in the long run... hosting and using a dedicated server is another issue to get over as well - Trial and error works but it does take a while. Hence why i suggest the basics first and understanding efficiency and necessity when coding. keep plugging away and goodluck
  13. if !(alive off1) then { hint "works up until this bit"; _null = [west, "tskobj_5", ["Locate and kill the officer", "Kill Officer", "Kill Officer"], "obj_5", true] spawn BIS_fnc_taskCreate; }else { _null = [west, "tskobj_6", ["Locate other Resistance", "More Resistance", "Resistance"], "obj_6", true] spawn BIS_fnc_taskCreate; }; [res1, res2] join player;
  14. You can use the same process, instead of using the button to execute, you can use a loop that runs whilst a dialog is opened. That loop reads whats in the list and then executes it, by reading what is in that particular position of the list.
  15. @black mamba - many thanks dude - what a dick i am not seeing that forward slash!!!!!!! may thanks to the rest of you for the assistance
  16. Sorry chaps been a while since any real MP scripting in last 6 months, and thus on attempting to piss around with BIS_fnc_MP I cannot get a file to be executed for a specific player/client checked the BIS_fnc_MP wiki - mentioned something about id as part of the available parameters - "Number - function will be executed only on client with the given ID" firstly what is the id? uid or netid? if its either i have tried both with no joy. e.g if (isserver) then { //load of code _net = netid _resel; [[],"gui\secopscallmenu.sqf","BIS_fnc_execVM",_net,false] spawn BIS_fnc_MP; }; _resel is a player picked out of an array - back in A2 - [nil,_resel,"loc",rEXECVM,"gui\secopscallmenu.sqf"] call re; - worked no problem and the one file would be called for that specific player - now i have no idea, and what i have ready have had no luck with if its netid - must admit not familiar with it and would appreciate a point in the right direction Any help would be appreciated.
  17. http://www.armaholic.com/page.php?id=19041&highlight=FOCK look at that - open the gui up and look at the scripts - should give you a better idea in reflection for what i have said above off to bed now - long old day - if i get a chance ill see if i can explain another way
  18. unfortunately - neither [ [ [], "gui/secopscallmenu.sqf" ], "BIS_fnc_execVM", [color="#FF0000"]_resel[/color], false ] call BIS_fnc_MP; or [ [ [], "gui/secopscallmenu.sqf" ], "BIS_fnc_execVM", [color="#FF0000"]_clientID[/color], false ] call BIS_fnc_MP; seem to work not sure if its something else - basically - for testing purposes i tried this file1.sqf if (isserver) then { execvm "file2.sqf"; }; file2.sqf PVHint = "hello"; publicvariable "PVHint"; hint "hello locally"; sleep 2; execvm "file2.sqf"; file3.sqf PVHint = "hello file three public"; publicvariable "PVHint"; hint "hello file 3.sqf"; sleep 2; for some reason - file one calls file two -which hints - however file three is never called - even for server? Any suggestions?
  19. in a basic way - that is another script that you create and place that stuff in there - lets say the group join function/script when the dialog pops up - u click and highlight a group in the list you then have an execute button - that when pressed e.g //this is from the gui menu idc = 1500; text = "Engineer"; //--- ToDo: Localize; action="[] spawn groupjoin"; //this line here is a function that calls the group join function/script x = 0.304051 * safezoneW + safezoneX; y = 0.313069 * safezoneH + safezoneY; w = 0.0721917 * safezoneW; h = 0.0439838 * safezoneH; it calls groupjoin script in that script you should have.... _index = lbCurSel 1500; _returnedGroup = lbText [1500, _index]; _selectedGroup = lbSetCurSel [1500, _index]; _playergrp = group player; { if (side _x == side player) then { _GroupName set [count _GroupName,_x]; }; } foreach allGroups; _array1 = _GroupName; _array2 = [_playerGrp]; _array3 = _array1 - _array2; _selected = _array3 select (_index); hint format ["Selected Group: %1",_selected]; this script then checks ibcursel 1500 - which is the idc 1500 box - it looks at what the cursor has selected and then returns the group thats when you then do stuff with it
  20. _clientID = owner _resel _uid = getplayeruid _resel; _net = netid _resel; //Ensure only the GUI gets called for selected Player from Array [[],"gui\secopscallmenu.sqf","BIS_fnc_execVM",_clientID,false] spawn BIS_fnc_MP; alas neither idea work - appreciate it though - thought the owner would have done it unless its not in the correct place
  21. select a group/squad from a list (labelled idc = 1500) _index = lbCurSel 1500; _returnedGroup = lbText [1500, _index]; _selectedGroup = lbSetCurSel [1500, _index]; _playergrp = group player; { if (side _x == side player) then { _GroupName set [count _GroupName,_x]; }; } foreach allGroups; _array1 = _GroupName; _array2 = [_playerGrp]; _array3 = _array1 - _array2; _selected = _array3 select (_index); hint format ["Selected Group: %1",_selected];
  22. Many thanks all, much appreciated - Starting work on chapter 4 finally - taking a while though so sorry about that
  23. its to do with the AI looking for the Cache - check that the correct markers are on the map and that nothing has been changed when creating the soldiers
  24. mikie boy

    [FOCK]ers Cache Hunt

    [FOCK]ers TvT [COOP] Cache Hunt V.5 New Version Combined - https://dl.dropboxusercontent.com/u/17725328/%5BFOCK%5D_TvT_COOP_CACHE_HUNT_05.Stratis.pbo Update - Combined the TVT game with the Option of having Automatic AI on West and East, in addition to the recruit AI GUI. Automatic AI will hunt for the Cache like human players. This function can be turned off or ratio increased to 1:4 Server will control the amount of Ai in relation to the amount of playable units. Fun to play on your own, chaos when theres loads of you and ratio set to 1:4. Simple game mode - Two sides - One town - multiple caches. A cache spawns per round in the small town, generally inside a building, both teams rush to secure the area and blow the cache before the other team. Simple. [FOCK] AI RECRUITMENT (cheap and cheerful) - AI recruitment allows for more fighting in the town. Parameters at the start allow for turning the AI off or on. The amount recruited can be turned up or down, as well as the distance from the base for when the recruit option is available. Default mode - A marker appears in town - offset within that marker is the selected building containing the cache - the marker generally covers several buildings. PinPoint mode - A marker appears directly onto the Cache - full on race No Marker - No markers - just search all around - suggest only having one or two rounds with this mode. NOTE- CACHES CAN ONLY BE DESTROYED WITH SATCHELS OR CHARGES - THATS IT! New restriction zones in place to stop AI and Players from wandering into the opposition side - took me ages to get this working but does the trick well. Uses VAC Ammobox System - V0.7 with this download - Load on spawn not working - V0.5 was however - may place that back in later. Built in compass at top of the screen showing constantly Name identifiers when looking at a player in game and on the map screen - However this only works for same sides. Videos (they are from an earlier version - things improved tenfold this these) Initial setup Cache Setup Cache found and destroyed Anyone fancy Playing - [FOCK] Server is up and running this game - We are still working on a few upgrades and randomization of things to keep the game interesting Credits... [FOCK] Mikie J - creator [FOCK] Wolowizard - assisted with testing, scripting, and all the ace images and sounds as usual [FOCK] Woody - tester as always [FOCK] Chuck - Tester ICEMAN77 - for the use of some of his HUD stuff :) + his timer script. Tophe - Vehicle respawn - where would we be without it Tonic - VAS system - nice job
  25. declare this at the start of your mission taggedUnits = []; is this what you mean?
×