sold67
Member-
Content Count
29 -
Joined
-
Last visited
-
Medals
Community Reputation
10 GoodAbout sold67
-
Rank
Private First Class
-
Vehicle follow Vehicle
sold67 replied to sold67's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I'm not using the map to tell it where to drive to because it is a life mission, so no waypoints. I tried grouping them before and it still wasn't working, but I might have done it incorrectly I will try it again. Thanks for the help. -
I can't seem to make the GPK in the script below follow the MTVR. It looks alright to to me, but I don't script, so someone else might be able to spot why it doesn't want to follow the MTVR/Convoytruck. It'll spawn both the GPK and the MTVR, but only the MTVR will start to move the idea is to have the GPK escort the convoy and engage anyone that tries to attack it. // script written by Eddie Vedder for the Chernarus life Revivved mission sleep 10; govconvoygroup = createGroup west; _counter = 0; _counter2 = 0; _added = false; _sidewon = "Neither"; while {true} do { //waits for respawn sleep (convoyrespawntime*54); "hint ""The Government convoy will leave in a few minutes."";" call broadcast; sleep (convoyrespawntime*6); //Gets position to spawn _array = [[convspawn1, 10], [convspawn2, 10], [convspawn3, 10], [convspawn4, 10], [convspawn5, 10]]; _spawn = (floor(random(count _array))); _pos = (_array select _spawn) select 0; _radius = (_array select _spawn) select 1; // spawn markers truck and soldiers _markerobj = createMarker ["convoy",[0,0]]; _markername = "convoy"; _markerobj setMarkerShape "ICON"; "convoy" setMarkerType "Marker"; "convoy" setMarkerColor "ColorRed"; "convoy" setMarkerText "Government Convoy"; convoy_marker_active = 1; convoyhascash=true; publicvariable "convoyhascash"; convoytruck = "Ural_TK_CIV_EP1" createVehicle getPos _pos;; gpk = "HMMWV_M1151_M2_DES_EP1" createVehicle getPos _pos;; convoytruck setVehicleInit " convoytruck = this; this setVehicleVarName ""convoytruck""; this lock true; this setAmmoCargo 0; this setDir getdir _pos; clearweaponcargo this; clearmagazinecargo this; "; gpk setVehicleInit " gpk = this; this setVehicleVarName ""gpk""; this lock true; this setAmmoCargo 1; this setDir getdir _pos; "; processinitcommands; publicvariable "convoytruck"; publicvariable "gpk"; deleteVehicle convoysoldier; convoysoldier = govconvoygroup createUnit ["US_Soldier_Officer_EP1", _pos, [], _radius, "FORM"]; convoysoldier setvehicleinit 'convoysoldier = this;this setVehicleVarName "convoysoldier";'; removeAllWeapons convoysoldier; convoysoldier addweapon "revolver_gold_EP1"; convoysoldier addmagazine "6Rnd_45ACP"; convoysoldier addmagazine "6Rnd_45ACP"; convoysoldier addmagazine "6Rnd_45ACP"; deleteVehicle convoyguard1; convoyguard1 = govconvoygroup createUnit ["US_Soldier_EP1", _pos, [], _radius, "FORM"]; convoyguard1 setvehicleinit 'convoyguard1 = this;this setVehicleVarName "convoyguard1";'; removeAllWeapons convoyguard1; convoyguard1 addmagazine "30Rnd_556x45_Stanag"; convoyguard1 addmagazine "30Rnd_556x45_Stanag"; convoyguard1 addmagazine "30Rnd_556x45_Stanag"; convoyguard1 addweapon "SCAR_L_CQC_Holo"; deleteVehicle convoyguard2; convoyguard2 = govconvoygroup createUnit ["US_Soldier_EP1", _pos, [], _radius, "FORM"]; convoyguard2 setvehicleinit 'convoyguard2 = this;this setVehicleVarName "convoyguard2";'; removeAllWeapons convoyguard2; convoyguard2 addmagazine "30Rnd_556x45_Stanag"; convoyguard2 addmagazine "30Rnd_556x45_Stanag"; convoyguard2 addmagazine "30Rnd_556x45_Stanag"; convoyguard2 addweapon "SCAR_L_CQC_Holo"; deleteVehicle convoyguard3; convoyguard3 = govconvoygroup createUnit ["US_Soldier_EP1", _pos, [], _radius, "FORM"]; convoyguard3 setvehicleinit 'convoyguard3 = this;this setVehicleVarName "convoyguard3";'; removeAllWeapons convoyguard3; convoyguard3 addmagazine "30Rnd_556x45_Stanag"; convoyguard3 addmagazine "30Rnd_556x45_Stanag"; convoyguard3 addmagazine "30Rnd_556x45_Stanag"; convoyguard3 addweapon "SCAR_L_CQC_Holo"; deleteVehicle convoyguard4; convoyguard4 = govconvoygroup createUnit ["US_Soldier_EP1", _pos, [], _radius, "FORM"]; convoyguard4 setvehicleinit 'convoyguard4 = this;this setVehicleVarName "convoyguard4";'; removeAllWeapons convoyguard4; convoyguard4 addmagazine "30Rnd_556x45_Stanag"; convoyguard4 addmagazine "30Rnd_556x45_Stanag"; convoyguard4 addmagazine "30Rnd_556x45_Stanag"; convoyguard4 addweapon "SCAR_L_CQC_Holo"; processInitCommands; deleteVehicle gpksoldier; gpksoldier = govconvoygroup createUnit ["US_Soldier_Officer_EP1", _pos, [], _radius, "FORM"]; gpksoldier setvehicleinit 'gpksoldier = this;this setVehicleVarName "gpksoldier";'; removeAllWeapons gpksoldier; gpksoldier addweapon "revolver_gold_EP1"; gpksoldier addmagazine "6Rnd_45ACP"; gpksoldier addmagazine "6Rnd_45ACP"; gpksoldier addmagazine "6Rnd_45ACP"; deleteVehicle gpksoldier1; gpksoldier1 = govconvoygroup createUnit ["US_Soldier_Officer_EP1", _pos, [], _radius, "FORM"]; gpksoldier1 setvehicleinit 'gpksoldier1 = this;this setVehicleVarName "gpksoldier1";'; removeAllWeapons gpksoldier; gpksoldier1 addweapon "revolver_gold_EP1"; gpksoldier1 addmagazine "6Rnd_45ACP"; gpksoldier1 addmagazine "6Rnd_45ACP"; gpksoldier1 addmagazine "6Rnd_45ACP"; deleteVehicle gpksoldier2; gpksoldier2 = govconvoygroup createUnit ["US_Soldier_Officer_EP1", _pos, [], _radius, "FORM"]; gpksoldier2 setvehicleinit 'gpksoldier2 = this;this setVehicleVarName "gpksoldier2";'; removeAllWeapons gpksoldier; gpksoldier2 addweapon "revolver_gold_EP1"; gpksoldier2 addmagazine "6Rnd_45ACP"; gpksoldier2 addmagazine "6Rnd_45ACP"; gpksoldier2 addmagazine "6Rnd_45ACP"; deleteVehicle gpksoldier3; gpksoldier3 = govconvoygroup createUnit ["US_Soldier_Officer_EP1", _pos, [], _radius, "FORM"]; gpksoldier3 setvehicleinit 'gpksoldier3 = this;this setVehicleVarName "gpksoldier3";'; removeAllWeapons gpksoldier; gpksoldier3 addweapon "revolver_gold_EP1"; gpksoldier3 addmagazine "6Rnd_45ACP"; gpksoldier3 addmagazine "6Rnd_45ACP"; gpksoldier3 addmagazine "6Rnd_45ACP"; processInitCommands; govconvoygroup selectLeader convoysoldier; convoysoldier moveInDriver convoytruck; convoysoldier assignAsDriver convoytruck; gpksoldier moveInDriver gpk; gpksoldier assignAsDriver gpk; //make guards follow convoysoldier convoyguard1 dofollow convoysoldier; convoyguard2 dofollow convoysoldier; convoyguard3 dofollow convoysoldier; convoyguard4 dofollow convoysoldier; govconvoygroup setbehaviour "AWARE"; govconvoygroup setCombatMode "GREEN"; //Make GPK guards follow driver gpksoldier1 doFollow gpksoldier; gpksoldier2 doFollow gpksoldier; gpksoldier3 doFollow gpksoldier; govconvoygroupgpk setbehaviour "AWARE"; govconvoygroupgpk setCombatMode "RED"; //put guards in car with convoysoldier convoyguard1 moveincargo convoytruck; convoyguard1 assignAsCargo convoytruck; convoyguard2 moveInCargo convoytruck; convoyguard2 assignAsCargo convoytruck; convoyguard3 moveInCargo convoytruck; convoyguard3 assignAsCargo convoytruck; convoyguard4 moveInCargo convoytruck; convoyguard4 assignAsCargo convoytruck; sleep 2; convoysoldier commandMove getpos copbase1; //put GPK guards in car with gpksoldier gpksoldier1 moveincargo gpk; gpksoldier1 assignAsCargo gpk; gpksoldier2 moveInGunner gpk; gpksoldier2 assignAsGunner gpk; gpksoldier3 moveInCargo gpk; gpksoldier3 assignAsCargo gpk; sleep 2; gpksoldier doFollow convoytruck; //start mission loop "server globalchat ""The supply truck has spawned. The police must defend it against bandits and terrorists!"";" call broadcast; while {true} do { "if(alive player and isciv and player distance convoytruck <= 150)then{titleText [""The Government is operating in this area! Turn back or you will be shot!"", ""plain down""]};" call broadcast; "convoy" setmarkerpos getpos convoytruck; if (!alive convoyguard1) then { deletevehicle convoyguard1; }; if (!moneyintruck) exitwith { _sidewon = "Bandits"; }; if (!alive convoyguard2) then { deletevehicle convoyguard2; }; if (!alive convoyguard3) then { deletevehicle convoyguard3; }; if (!alive convoyguard4) then { deletevehicle convoyguard4; }; if (!alive convoysoldier and !_added) then { _added = true; stealgovmoney = convoytruck addAction ["Steal Government salaries", "stealgovmoney.sqf",[""],1,false,true,"","isciv"]; "if (isciv) then {server sidechat ""The government convoy driver is dead. Steal the police paycheck."";};" call broadcast; "if (iscop) then {server sidechat ""The governemnt convoy driver is dead. Get in his truck and drive it to the Cop Base"";};" call broadcast; convoytruck setVehicleLock "unlocked"; unassignVehicle convoyguard1; unassignVehicle convoyguard2; unassignVehicle convoyguard3; unassignVehicle convoyguard4; convoyguard1 action ["eject", convoytruck]; convoyguard2 action ["eject", convoytruck]; convoyguard3 action ["eject", convoytruck]; convoyguard4 action ["eject", convoytruck]; convoyguard1 dofollow convoytruck; convoyguard2 dofollow convoytruck; convoyguard3 dofollow convoytruck; convoyguard4 dofollow convoytruck; }; if (_counter >= 15) then { convoysoldier commandMove getpos copbase1; _counter = 0; }; if (convoytruck distance copbase1 < 150) exitwith { "if (iscop) then {bankaccount = (bankaccount + govconvoybonus); player sidechat format[""you received $%1 for the successfully escorting the convoy"", govconvoybonus];};" call broadcast; _sidewon = "Cops"; }; if (_counter2 >= 900) exitwith { _sidewon = "Neither"; }; if (!alive convoytruck) exitwith { "server globalchat ""The government truck has been destroyed the money has burned"";" call broadcast; _sidewon = "Neither"; }; _counter2 = _counter2 + 1; _counter = _counter + 1; sleep 1; }; //mission has ended resetting vars and deleting units (format ['server globalChat "%2 side won the government convoy mission, next truck leaves in %1 minutes!";', convoyrespawntime, _sidewon]) call broadcast; [_sidewon] call whowon; deletevehicle convoyguard1; deletevehicle convoyguard2; deletevehicle convoyguard3; deletevehicle convoyguard4; deletevehicle convoysoldier; deletevehicle convoytruck; deletemarker "convoy"; _endmissionounter = 0; _counter = 0; _counter2 = 0; _sidewon = "Neither"; moneyintruck = true; _added = false; }; //written by Gman The second problem I'm having is that the GPK doesn't seem to detect my presence and open fire on me in fact I haven't even seen the AI rotate the GPKs gun which worries me. I'm pretty stuck here! Does anyone have any idea what the problems could be?
-
Government Convoy (Life mission)
sold67 replied to sold67's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Solved. -
Government Convoy (Life mission)
sold67 posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Solved. -
Converting a small script
sold67 replied to sold67's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
You're a hero! Thank you ever so much. -
Hi, I am not a scripter and having some trouble converting a script to where it is run only (If that makes any sense). I want it to delete all vehicles that are unoccupied in a defined range, so here is what I am currently using that runs via dev tool, but straight up deletes every vehicle: _vehicle = nearestObjects [player, ["Car","Air"], 50]; { deletevehicle _x } forEach _vehicle; Here is one I found which deletes only unocupied vehichles, but since I don't script I can't convert it! I would love any help it is driving me crazy. case 123: // Carmagedon { _distance = parseNumber(_inputText); if ((typeName _distance) == (typeName (1234))) then { player groupchat format["Starting Carmagedon at a range of %1 meters", _distance]; { { if ({alive _x} count crew _x == 0) then { deleteVehicle _x; }; } foreach((getpos player) nearObjects [_x, 15]); } forEach ["LandVehicle", "Air", "Car", "Motorcycle", "Bicycle", "UAV", "Wreck", "Wreck_Base", "HelicopterWreck", "UH1Wreck", "UH1_Base", "UH1H_base", "AH6_Base_EP1","CraterLong", "Ka60_Base_PMC", "Ka137_Base_PMC", "A10"]; } else { hint "ERROR: expected number"; }; }; Thank you.
-
bump!
-
[Multiplayer] ArmA 3 Stratis Life [W.I.P / Release this weekend]
sold67 replied to Caiden's topic in ARMA 3 - USER MISSIONS
Awesome, I love that you are releasing everything as life servers always seem to be competitive against each other and at times attack each. It is refreshing to see this! Great work. -
I'm horribly bad at scripting can anyone help me out w/ the following: Victim.sqf: if(isdead == 1)exitwith{}; isdead = 1; _killer = _this select 0; _nearVehicles = _this select 1; _killerLicense = 0; suicided = false; _murdered = true; _killerstring = format["%1", _killer]; if (!(_killer call ISSE_UnitExists)) then { (format ["[""Died"", ""%1""] spawn Isse_AddCrimeLogEntry;kopfgeld_%1 = 0;", rolestring]) call broadcast; } else { _killedByVehicle = false; if (player == _killer) then { _murdered = false; if(typename _nearVehicles == "STRING" and INV_hunger < 100)exitwith{suicided = true;}; { if ( (speed _x > 10) and (!(isNull(driver _x))) ) then { _killer = driver _x; _killedByVehicle = true; _vehicle = typeof _x; _infos = _vehicle call INV_getitemArray; _killerlicense = (_infos select 4) select 1; _killerstring = format["%1", _killer]; }; } forEach _nearVehicles; }; if(side _killer == EAST and !isPlayer _killer) exitwith { format['["Died", "%1"] spawn Isse_AddCrimeLogEntry;kopfgeld_%1 = 0;server globalChat "%2 was killed by the military!"', player, name player] call broadcast; }; (format [" [""Died"", ""%1""] spawn Isse_AddCrimeLogEntry; if(%7 and !%5)then{server globalChat ""%3 was killed by %4""}; if (%5) then {server globalChat ""%4 hit %3 with a vehicle"";}; if(INV_hunger == 100)exitwith{server globalChat ""%3 starved to death!""}; if(player == %8) then {[%1, %5, %6] execVM ""killer.sqf""}; ", player, _killer, name player, name _killer, _killedByVehicle, _killerLicense, _murdered, _killerstring]) call broadcast; }; //kopfgeld_%1 = 0; It's a life mission script, but I want it like the TLR mission to be able to tell you if the person who was killed was armed or unarmed in the death message. I really don't know where to start any help is appreciated.
-
Helicopter insertion(Heli pilot doesnt stick to waypoint on detection of enemy units)
sold67 replied to sold67's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks Marker/Dale! Working great part from one small hiccup if I am in a helicopter with AI it only kicks myself out the chopper and not the AI unless I order them to disembark, so nothing massive thanks for all the help. -
Helicopter insertion(Heli pilot doesnt stick to waypoint on detection of enemy units)
sold67 replied to sold67's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I've managed to fix that problem (thanks animal), but the main problem now as soon as the helicopter lands it take off again - moving to the next waypoint - and you get no time to hop out the chopper. -
Helicopter insertion(Heli pilot doesnt stick to waypoint on detection of enemy units)
sold67 replied to sold67's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Tried that, but the AI still takes off before I can get out it. On the final waypoint the one after landing I tried putting this in the on act field: sleep 15; deleteVehicle helicopter2; Still no luck! -
Helicopter insertion(Heli pilot doesnt stick to waypoint on detection of enemy units)
sold67 replied to sold67's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks so much, it worked! Got a few other problems though, once the helicopter lands at the waypoint/invisible helipad it takes off again before I get the chance to get out, and it also takes too long to land know of anyways I can speed the landing up, and get the helicopter to say stay on the ground for say 5 seconds? Here is what I have on the landing waypoints on act: helicopter land "get out"; James leaveVehicle helicopter; This works if it is AI most of the time, but if james becomes a player it takes off the second it touches down allowing you no time to get out. Here is what I have on the helicopters init helicopter flyInHeight 20; this setCaptive true; -
I have a helicopter insertion working, but once I add some enemy units and the helicopter gets in view distance of those units it freaks out and no longer sticks to the waypoint and wont make any attempt to get back to it! I've tried a few things like setbehavior and disableai, but so far to no avail. I'd like the helicopter not to care if it is under fire etc, any ideas? Any help is appreciated.
-
Help w/ CFG & BATs for running server
sold67 posted a topic in ARMA 2 & OA - Servers & Administration
Fixed it please remove this topic/post