Jump to content

hogmason

Member
  • Content Count

    405
  • Joined

  • Last visited

  • Medals

Community Reputation

2 Neutral

4 Followers

About hogmason

  • Rank
    Gunnery Sergeant

core_pfieldgroups_3

  • Interests
    Arma

Recent Profile Visitors

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

  1. that will suffice if you like using triggers ;)
  2. easy to count enemy units then end if enemy numbers are less then specific number use this as is while {true} do { _totalEnemy = {alive _x && side _x == EAST} count allUnits; if (_totalEnemy < 11) then //change here the number of enemy units alive to end mission its set at 11 or below { player sidechat format["The enemy are retreating Well done boys", _totalEnemy ]; sleep 30; endmission "END2"; }; sleep 60 // this will check enemy units every 1 minute }; ---------- Post added at 18:05 ---------- Previous post was at 17:58 ---------- OK so also to include the enemy that are moving away from the task area just create an array of your enemy units and run a distance check on them and if they are a certain distance away just kill them // AO is a variable for thye position the enmy are attacking or target area so place an object down there and name it AO or something or even a marker is fine //marker example _opsAREA = getMarkerPos "yourmarkername"; //now change AO to _opsAREA if (_x distance AO <1200) then { } foreach MyEnemyArray; //this is your enemy array ---------- Post added at 18:08 ---------- Previous post was at 18:05 ---------- // AO is a variable for thye position the enmy are attacking or target area so place an object down there and name it AO or something or even a marker is fine //marker example _opsAREA = getMarkerPos "yourmarkername"; //now change AO to _opsAREA if (_x distance AO <1200) then { _x setDamage 1; //this will kill them } foreach units enemysquad2 AND enemysquad3 AND enemysquad4 AND enemysquad5;
  3. ive never used the arma artillery without code but i am pretty sure you have to link the artillery gunners or batteries to the artillery module
  4. dont have the time right now but try making the local variable a global variable like this a local looks like this _runallahakkbar a glkobal looks like this runallahakkbar not no underscore that way it can be read from anywhere. you most likely knew that but i dont know what you know so just trying to help unless your using _runallahakkbar somewhere else for different reasons then making it a global will not effect anything ---------- Post added at 09:44 ---------- Previous post was at 09:40 ---------- out of curiosity are you using show error hints then checking your error rpt log FOUND HERE C:\Documents and Settings\"YOUR USERNAME"\Application Data\ArmA 2 OA; http://forums.bistudio.com/showthread.php?137306-How-to-check-my-RPT-log
  5. No Use this hint "MISSION IS WON IF ALL BUT 10 OR LESS OF THE ENEMY OCCUPATION UNITS ARE ELIMINATED."; while {true} do { sleep 10; _agrps = (agrp1 + agrp2 + agrp3 + agrp4 + agrp5 + agrp6 + agrp7 + agrp8 + agrp9 + agrp10); _acount = {alive _x} count units _agrps; if (_acount > 11) then { hint format ["THERE ARE %1 ENEMY UNITS LEFT TO KILL", _acount]; } Else { If (_acount < 11) then { hint "MISSION ACCOMPLISHED"; }; }; }; now im a bit skeptical about _agrps = (agrp1 + agrp2 + agrp3 + agrp4 + agrp5 + agrp6 + agrp7 + agrp8 + agrp9 + agrp10); [color="#FF0000"]_acount = {alive _x} count units _agrps;[/color] Just let me know ---------- Post added at 23:58 ---------- Previous post was at 23:56 ---------- Yeah you gotta excuse me ive been codeing for 16 hrs straight on my latest pc program so my brain is a bit fried ATM lol
  6. hhhhhhmmmmmmmmmm cant see no code there to make the unit fire show us that bit and we can help.
  7. yeah for a starters from a quick look units Arma already uses units so you cant use that as your global variable name. thats going to cause conflicts also i could have missed it but i cant see anywhere after you spawn your units where you add them to the units array it should look like this to add them _driver = _group createUnit ["TK_Soldier_AT_EP1", _pos, [], 0, "FORM"]; _driver moveInDriver _truck; units set[(count units ), _driver ]; bit late here and eyes are hanging out my head ill look a bit better tomoz
  8. you can shorten all that massive nest of if statement for enemy count with hint by using this _totalEnemy = {alive _x && side _x == EAST} count allUnits; if (_totalEnemy > 11) then { player sidechat format["THERE ARE %1 ENEMY UNITS LEFT TO KILL", _totalEnemy ]; } Else { If (_totalEnemy < 11) then { player sidechat format["THERE ARE %1 Mission is compleate", _totalEnemy ]; //call end mission code now }; }; as far counting kills for each player arma give me 10
  9. Ok sadly i just found out over at Armaholic that Reezo has left the community and taken his code work with him :( Basicaly i am needing a copy of the loudspeaker script he released a while ago has any 1 got a copy if so can you please place a link for me cheers ;).
  10. That did not work mate the issue I get is the player that buys the car can see the images on the car but no other players can this is what I tried from you cuel _classname = _this select 0; newvehicle = _classname createVehicle %4; if (_classname == "SUV_UN_EP1") then { [nil,nil,"per",rSETOBJECTTEXTURE,newvehicle,0,"graphics\suvpolice.paa"] call RE; [nil,nil,"per",rSETOBJECTTEXTURE,newvehicle,1,"graphics\suvpolice.paa"] call RE; };
  11. yeah I changed the ref to object for this post its actually _veh which comes from _v = _this select 0; cheers cuel ill try that ;)
  12. I have a issue, I am spawning a vehicle and trying to add a image along the vehicle for all players to see but only the player who buys the vehicle can see the image how can I make it so all players can see the image. I tried. if (_classname == "SUV_UN_EP1") then { _classname setobjecttexture [0,"suvpolice.paa"]; _classname setobjecttexture [1,"suvpolice.paa"]; }; and if (_classname == "SUV_UN_EP1") then { [nil, nil,"per",// // _classname setobjecttexture [0,"suvpolice.paa"],// _classname setobjecttexture [1,"suvpolice.paa"]// // ] call RE; };
  13. FUNNY lol I just signed in to say I just thought and tried that and guess what it WORKS :) Thanks any way Das and thanks to all that helped ;)
  14. DOESNT WORK I tried defines.sqf --- launched by in my init call compile preprocessfile "common\defines.sqf"; AO_locations = nearestLocations [getPosATL Map_center, ["NameVillage","NameCity","NameCityCapital"], 25000]; task.sqf if (AO_locations == 0) then { hint "GAME OVER"; } else { // my task code in here }; I get this error Error ==: Type Array, expected Number,String,Object,Side,Group,Text,Config entry,Display (dialog),Control,Team member,Task,Location
×