Jump to content

twirly

Member
  • Content Count

    1304
  • Joined

  • Last visited

  • Medals

Everything posted by twirly

  1. More ways than one to do this...but just started typing and this is the result :) There's a little demo mission here for you to check out. http://www.mediafire.com/file/1us3csre3qjycq8/Test_Catch_Enemy.utes.zip It's a script that runs on the "enemy" and checks the array of "catchers" to see if any are close (<10). It's only good for one shot...so will exit when the enemy has been found. The script is run from the Init of the enemy. Better to have one script running for one guy ....than one script running for each catcher! In the demo mission....the catchers and the enemy are all playable..... so you can Teamswitch to check that the script works no matter if you are the enemy or a catcher. If you need more help.... I'll be glad to help. EDITED: AZCoder pointed out I had the wrong link. Thanks. Link fixed.
  2. Here buddy...but it is an MV22 and US troops. That aircraft just happened to be sitting on the tarmac :) Anyway it will do you good to figure out how to swap things around! Pay attention to the the fact that the groups have names.....the aircraft has a name and the waypoint executes the paradrop script. http://www.mediafire.com/file/qlniy8j65esf5mt/Test_Paradrop_Groups.utes.zip Hope it helps and you might learn something in the process! Good luck!
  3. Try this mate....this will disable the gun lights for the group "_group". {_x enableGunLights false} forEach units _group;
  4. twirly

    Scattered Markers

    When I place a marker in the editor it shows up! .... no problems. Are you placing it with a script?
  5. I own a RL M-16 and and AK....and on neither one can I select hand grenades or smoke from the fire selector! This really needs to be moved to somewhere else. Trying to select a fire mode and getting a grenade is far from realistic. It's also a pain the arse!
  6. This is just a fun addon for those who might like to check it out. It's my M-107 FUBAR. You know what that means :) It has both Night Vision and all the Thermal Modes and fires something close to 30mm cannon shells. Three pbo's are included in the zip :- armcha_m107fu.pbo armcha_m107_mag.pbo armcha_m107_amm.pbo Add them to your favourite addons folder or whatever. You should know the drill soldier! Weapon name: M-107 FUBAR Weapon Classname : m107_fubar Magazine name: 10Rnd 127x99 (HE) Magazine Classname: 10Rnd_127x99_m107_HE The weapon looks the same. The "10Rnd 127x99 (HE)" magazine has a red stripe across it to make it easy to identify. Works in OA/CO. Not tested in Arma 2. Hope somebody likes it! http://www.mediafire.com/file/7p2he00m5jtxy79/ArmchairArms_m107FU.zip Extract the zip to get to the pbo's. Mirrored at Armed Assault.info :cool: Many thanks guys! Now....also at Armaholic. Thanks people :D M107 FUBAR
  7. You have to create the group.... _group = createGroup EAST; Then you do this...but you had it all wrong! _wp = _group addWaypoint [_wayptpos, 10]; [_group , 1] setWaypointBehaviour "SAD"; [_group , 1] setWaypointType "NORMAL"; [_group , 1] setWaypointCombatMode "STAG COLUMN"; There's more to it so best you read the Wiki I think! http://community.bistudio.com/wiki/addWaypoint Never give up!! LOL!
  8. At the waypoint...try just giving them a new formation. From a trigger...put this in the On Act :- wgrp1 setFormation "LINE"; Where wgrp1 is the name of the group. http://community.bistudio.com/wiki/setFormation
  9. That's an excellent point to make. I agree with this....it's obvious some thought went into it. This is what we need!
  10. Try this man.... This was made for Arma for the excellent Robert Hammer handguns...but you can change the classnames to suit. Will work in Arma 2 /OA/CO as well. One place you can find the classnames for the weapons and ammo is here:- http://www.ofpec.com/COMREF/index.php?action=read&id=210 Create a script called "rand_weapons.sqf" and copy the code below into it. Save it in your mission folder. Script: ""rand_weapons.sqf" [private "_dude","_handgun""_handguns","_mag","_mags","_rnd","_i"]; _dude = _this select 0; //create an array of guns _handguns = ["RH_deagles","RH_vz61","RH_tec9","RH_muzi","MP5SD"]; //create an array of matching mags...must match the order above _mags = ["7Rnd_50_AE","20Rnd_32cal_vz61","30Rnd_9x19_tec","32Rnd_9x19_Muzi","30Rnd_9x19_MP5SD"]; _rnd = floor random (count _handguns); _handgun = _handguns select _rnd; _mag = _mags select _rnd; //remove everything from the unit removeAllWeapons _dude; for [{_i=1},{_i<=8},{_i=_i+1}] do { _dude addMagazine _mag; }; _dude addWeapon _handgun; for [{_i=1},{_i<=2},{_i=_i+1}] do { _dude addMagazine "HandGrenadeTimed"; }; _dude addweapon "Binocular"; _dude addweapon "NVGoggles"; _dude selectweapon _handgun; To run the script from another script use:- nul=[_soldier] execVM "rand_weapons.sqf"; You can also just put this in your units Init box. nul=[this] execVM "rand_weapons.sqf"; If you need more help...just post again.
  11. Ditto! ....where is the script?
  12. Hi buddy....hope this helps you. This script moves the object wsold1 (the object can be anything) from marker1 to marker2 in 0.1m steps....pausing for 0.2 seconds between steps. Change the object, markers, steps and timing to suit. Place the markers "marker1" and "marker2" some distance apart. Place wsold1 anywhere...he will be at the start position (marker1) when the script runs. Execute the code like this:- nul = [wsold1,"marker1","marker2",0.1,0.2] execVM "move_obj.sqf"; The script itself:- "move_obj.sqf" private ["_obj","_mkr1","_mkr2","_step","_timg","_x","_y","_i","_dis","_dir"]; _obj = _this select 0; _mkr1 = _this select 1; _mkr2 = _this select 2; _step = _this select 3; _timg = _this select 4; _obj setPos getMarkerPos _mkr1; //sets the object to the first marker position _x = ((getMarkerPos _mkr2 select 0)-(getMarkerPos _mkr1 select 0)); _y = ((getMarkerPos _mkr2 select 1)-(getMarkerPos _mkr1 select 1)); //trig _dir = _x atan2 _y; if (_dir < 0) then {_dir = _dir+360}; //direction from mkr1 to mkr2 //pythagoras _dis = sqrt(_x^2+_y^2); //distance from mkr1 to mkr2 for [{_i=0},{_i<_dis},{_i=_i+_step}] do { _x = sin(_dir)*_i; _y = cos(_dir)*_i; _obj setPos [(getMarkerPos _mkr1 select 0) + _x,(getMarkerPos _mkr1 select 1) + _y,0]; sleep _timg; }; There's a little test done on Utes here for you. http://www.mediafire.com/file/ggg7kquuub1mpfa/AA_Test_Move_Target.utes.zip If you have trouble...post again.
  13. Using the numbers 0-4.....or how ever many are needed......in my opinion would be sweet. One keypress...get what you need! It only takes a thought in real life. The closest thing to a thought in a game is....without a doubt....one keypress!
  14. Hi...anyone know the correct syntax for embedding a function in a script? For example I've tried this construct... fnAdd = { private ["_num1","_num2","_num3"]; _num1 = _this select 0; _num2 = _this select 1; _num3 = _num1 + _num2; _num3 }; .....and then later on in the script...... _num = [2,2] call fnAdd; Doesn't work! I've seen it before in lots of code (I think!)....but for the life of me can't seem to open an sqf with what I'm looking for. Still searching though. :confused: Edit: Problem solved! That is the correct code above.....My script was a little more complicated that that. Writing it out there in a simple form actually helped! Hahah...Therepy!
  15. A million and one uses.......so it should be perfect! You can distill almost anything organic and get some form of alcohol....so it's a fuel too! http://en.wikipedia.org/wiki/Hemp
  16. Hello All, I just had a need to convert azimuths to a compass directions so made this little function so I'd end up with a one liner in my script. It's not fancy by any means but does the job. It returns a string containing "North" or "South" or "South South East" etc... I know it can be more efficient...as it is it has to check every "if". I have a fancier algorithm somewhere to do this I think...but this was quick and easy to do with a calculator and serves my purpose. If you don't like it...don't use it!! Setup the function in your init.sqf like this (in this example it is in a folder called "func") :- az2cardinal = compile PreProcessfile "func\fn_az2cardinal.sqf"; Call the function like this:- _compdir = [_ang] call az2cardinal; Examples:- For _ang = 175.5 degrees then _compdir would be the string "South" For _ang = 33.0 degrees then _compdir would be the string "North North East" For _ang = 310.75 degrees then _compdir would be the string "North West" and so on... The function itself:- "fn_az2cardinal.sqf" //*********************************************** //** Function "fn_az2cardinal.sqf". //** Twirly [2010] //*********************************************** private ["_ang","_compass"]; _ang = _this select 0; if (_ang>348.75 and _ang<=360 or _ang >=0 and _ang <11.25) then {_compass = "North"}; if (_ang>11.25 and _ang<=33.75) then {_compass = "North North East"}; if (_ang>33.75 and _ang<=56.55) then {_compass = "North East"}; if (_ang>56.55 and _ang<=78.75) then {_compass = "East North East"}; if (_ang>78.75 and _ang<=101.25) then {_compass = "East"}; if (_ang>101.25 and _ang<=123.75) then {_compass = "East South East"}; if (_ang>123.75 and _ang<=146.25) then {_compass = "South East"}; if (_ang>146.25 and _ang<=168.75) then {_compass = "South South East"}; if (_ang>168.75 and _ang<=191.25) then {_compass = "South"}; if (_ang>191.25 and _ang<=213.75) then {_compass = "South South West"}; if (_ang>213.75 and _ang<=236.25) then {_compass = "South West"}; if (_ang>236.25 and _ang<=258.75) then {_compass = "West South West"}; if (_ang>258.75 and _ang<=281.25) then {_compass = "West"}; if (_ang>281.25 and _ang<=303.75) then {_compass = "West North West"}; if (_ang>303.75 and _ang<=326.25) then {_compass = "North West"}; if (_ang>326.25 and _ang<=348.75) then {_compass = "North North West"}; _compass If you have any problems please let me know. Twirly.
  17. Works sweet man......simply replaced my clunky code with this and it worked great.....except for the little typo with the underscore in the 22.5! Good one. Nice elegant solution.
  18. Have a read about knowsabout. It may be what you need but will require some work!
  19. @callihn...Why is your plane still falling mate? Use this and it won't fall....honestly! _plane= createVehicle ["A10", _planepos, [], 0, "FLY"]; [color="Red"]_plane setDir 180;[/color] _dir = getDir _plane; _speed = speed _plane; _plane setVelocity [sin(_dir)*_speed/3.6,cos(_dir)*_speed/3.6,0]; _crew = createGroup WEST; _pilot = _crew createUnit ["USMC_Soldier_Pilot",[0,0,30], [], 0, "NONE"]; _pilot assignAsDriver _plane; _pilot moveInDriver _plane; Edit: Made a change (in red)....this works. Tested it. Here is an Arma 2 example :- http://www.mediafire.com/file/pmmtl2lhf90mm2h/AA_ARMA_Test_Create_Plane.utes.zip Good luck!
  20. Thanks man....yes it does. I just got it! My script was more complicated and I had an error somewhere. Started over from scratch and bingo!! Been dicking with this for hours. Should have spent more time with the script than looking for the answer! Thanks again.
  21. I am the OP! ...so much for reading huh?
  22. Yeah....it looks sweet sometimes to see them fighting the spin :) Uncontrolled autorotation!
×