Jump to content

Big_Daddy

Member
  • Content Count

    208
  • Joined

  • Last visited

  • Medals

Everything posted by Big_Daddy

  1. Ok, I'm working on getting my UAV up and running. I've gotten it working with MP, and with respawning. It's beautiful.. :) I'll post code later. I'm trying to enhance the usefulness of the UAV. I've gotten the divebombing etc under control, what I'm working on now is the ability to lock onto a target or the ground. Arma 1 UAV's just created a camera with the position set to the UAV. By using a camera, you had the ability to "lock" onto anything by default. (camera.sqs functionality). It looked good, but with that approach you cannot control the missles, marker, etc. Is there a way to lock your aim at a certain point? I've tried dotarget, dowatch, etc.. Thanks. Edit: worldtoScreen and setMousePosition looks promising but I'd need it to update every frame..
  2. Yes, yes, i've searched, and found many wonderful posts from the likes of Xeno, cobra, etc.. but I've found something that's throwing me for a loop. Background. I'm trying to add UAV to Xeno's Domination map (wonderful work btw) And I'm working around the fact that when you die, or when the UAV dies that's it, no more UAV fun. Now, I've been able to do this, and it works great. Twice. The third time I try to respawn the UAV it doesn't have a crew. It just crashes into the ground. Here's the code: Addaction on init of Mobile Spawn 1 nul = this addAction ["Launch UAV", "uav.sqf",["xvec1",100,"BIS_UAV","xvec2,xvec1","MQ9PredatorB","west"],0,false] The arguments I haven't quite got working yet (that will be the next question :)) uav.sqf: /* ========================================================= 1: spawn location 2: spawn height 3: Name of UAV Module - BIS_UAV 4: units to be syncronized with Names, xvec2, xvec1, (_vec_array select 0) 5: Version of UAV - MQ9PredatorB 6: side/group _myarray = _this select 3; _spawloc = _myarray select 0; _spawhei = if (count _myarray > 1) then {_myarray select 1} else {100}; _uavMod = if (count _myarray > 2) then {_myarray select 2} else "BIS_UAV"; _units = if (count _myarray > 3) then {_myarray select 3} else "xvec1, xvec2"; _uavType = if (count _myarray > 4) then {_myarray select 4} else "MQ9PredatorB"; _grp = if (count _myarray > 5) then {_myarray select 5} else "west"; ========================================================= */ _vec_array = [[getPos xvec1 select 0, getPos xvec1 select 1, (getPos xvec1 select 2) +100], random 360, "MQ9PredatorB", west] call BIS_fnc_spawnVehicle; BIS_UAV synchronizeObjectsAdd [xvec2, xvec1, (_vec_array select 0)]; _vec_array disableAI "AUTOTARGET"; _vec_array disableAI "TARGET" ; _vec_array setCombatMode "BLUE"; _vec_array setBehaviour "careless"; UAV = _vec_array select 0; hint format ["%1", _vec_array]; //_vec_array = [[getPos _spacloc select 0, getPos _spawloc select 1, (getPos _spawloc select 2) + _spawhei], random 360, _uavType, _grp] call BIS_fnc_spawnVehicle; //_uavMod synchronizeObjectsAdd [_units,(_vec_array select 0)]; hint "UAV has been Launched"; exit Now, again, this works flawlessly twice. the third time, it just crashes into the ground. (but you CAN watch it crash from the UAV terminal) Also, the _vec_array disableAI "AUTOTARGET"; _vec_array disableAI "TARGET" ; _vec_array setCombatMode "BLUE"; _vec_array setBehaviour "careless"; isn't working. maybe I need to add private ["_vec_array"]; Thanks in advance...
  3. That has nothing to do with karmichael's (or mine) scripts. That is an error generated from the UAV module itself. It happens when you tell the UAV module to add an entire side using: BIS_uav_1 setvariable ["rules",[west]] When the UAV module goes through and adds everything it needs to be synchronized to, it tries to synchronize to the WEST side. it errors, but it still works.
  4. See, that's weird. Cause thats all we play on is a dedicated server. And we've never had issues with the UAV. Now understand that if someone comes in after you've launched the UAV, they cannot control that UAV. But they should be able to control the next one that is launched. Did you notice the init of the UAV module? that's important as well. Everyone on west has access. If you don't have that, then yes, you'd not be able to control the UAV. (UAV has been destroyed)
  5. Big_Daddy

    Multiplayer Framework

    try: _nic = [objNull, unit, rprocessInitCommands] call RE; and you only have to run it once.
  6. Here ya go... download
  7. didn't have it listed there, but you do have the processInitCommands, right?
  8. well.... I use a script for teleporting using on mapclick. I allow the shift click (actually bypass shift click cause people were teleporting while flying. funny stuff) Couldn't a script be written that bypasses everything else, and just blocks shift click? Then run that script at player init? (the else at the bottom of the script is for getting ontop of buildings) _pos = _this select 0; _shift = _this select 1; _alt = _this select 2; //hint format ["%1 - %2 - %3",_pos, _shift, _alt]; if (_shift) exitwith {}; //<- This allows the bypass if (!(_alt)) then { player setPosATL [_pos select 0, _pos select 1,(_pos select 2)+5]; } else { _cone = "RoadCone" createVehiclelocal [_pos select 0, _pos select 1, (_pos select 2)]; _obj= nearestObject [_cone, "Building"]; deletevehicle _cone; _array = boundingBox _obj; _max = _array select 1; _max = _obj modelToWorld _max; _height=_max select 2; _height = ceil _height; player setPos [_pos select 0, _pos select 1,_height]; player allowDamage false; sleep 15; player allowDammage true; };
  9. Latest version of UAV script. /* ========================================================= Default values of all settings are: nul = this addAction ["Launch UAV", "uav.sqf",[xvec1,100,BIS_uav_1,"xvec2,xvec1",MQ9PredatorB,west],0,false] 1: spawn vehicle/building 2: spawn height 3: Name of UAV Module - ie BIS_UAV 4: units to be syncronized with Names, "xvec2, xvec1" 5: Version of UAV - MQ9PredatorB 6: side/group ========================================================= */ private ["_vec_array","_myarray"]; _myarray = _this select 3; _spawloc = _myarray select 0; _spawhei = if (count _myarray > 1) then {_myarray select 1} else {100}; _uavMod = if (count _myarray > 2) then {_myarray select 2} else {BIS_UAV_1}; _units = if (count _myarray > 3) then {_myarray select 3} else {xvec1, xvec2}; _uavType = if (count _myarray > 4) then {_myarray select 4} else {MQ9PredatorB}; _grp = if (count _myarray > 5) then {_myarray select 5} else {"west"}; _vclname="MyUAV"; _vec_array = [[getPos _spawloc select 0, getPos _spawloc select 1, (getPos _spawloc select 2) +_spawhei], random 360, _uavType, _grp] call BIS_fnc_spawnVehicle; _vcl = _vec_array select 0; _vcl SetVehicleVarName _vclname; _vcl Call Compile Format ["%1=_vcl;PublicVariable ""%1"";",_vclname]; _initCmd=format["this addMagazine ""4Rnd_Sidewinder_AV8B"";this addWeapon ""SidewinderLaucher""; this disableAI ""AUTOTARGET"" ; this disableAI ""TARGET"" ; this setCombatMode ""BLUE"";this setBehaviour ""careless"";%1 synchronizeObjectsAdd [%2,%3];",_uavmod,_vcl,_units]; _vcl setVehicleInit _initCmd; processInitCommands; clearVehicleInit _vcl; Player sideChat "UAV has been Launched";
  10. Big_Daddy

    arma shortcuts

    You don't.. The reason the map kept saying that you needed the addon after you removed it is inside the mission.sqm at the top, the addon was still listed. You'd just have to delete that entry. Also, with steam, you have to check 2 places for command line options. First, the actual icon. Second, In Steam Games, Properties on Arma 2, Set launch Options. For myself. I have all the options I use for programing, and playing, listed in the Second area. -nosplash -world=empty -winxp -maxmem=2047 -noPause Then in the programing icon I have: D:\Steam\Steam.exe -applaunch 33900 -window -showScriptErrors
  11. Well, do you have a plane flying? _plane = _this select 0; This line tells what plane is there to attach the bombs too. _nil = [myplanename] execVm "carpet.sqf";
  12. Big_Daddy

    Ammo check?

    ammo player sidechat format ["%1",veh_m1a1 ammo "m256"] You'll have to get the gun name. Armatech has a great layout of the info.
  13. Kronsky has a cool script that lets you get the information your looking for. Vehicle Browser Add whatever your wanting to his sample mission, preview it, and walk up to it. You'll get the exact info you are looking for. It works for buildings/vehicles. Whatever the script tells you, place that into the init of the object on your mission.
  14. Big_Daddy

    Map question

    that's what' he's saying. Ondoubleclick. if you set that for everyone. then the normal double click for just "text" isn't allowed. You'd have to script in to have a marker created, the text in the marker etc etc. then you can script whatever you wanted.
  15. Big_Daddy

    setHit

    it's because it sends several every time a unit gets hit. if your doing a hint, you may only see the last time it was fired. try sidechat.. you'll see all of them.
  16. Go right ahead... Happy to have it out there.
  17. Big_Daddy

    setHit

    You'd have to add an Eventhandler for HandleDamage Now when that fires, you'll get several being fired. One of them, I believe the first is for the head. Just do some searching. You'll find several posts on how to use the event handlers, and handledamage in particular.
  18. Pappy? your answer is in Nuxil's link as well. Look for Kylania's link for Translations
  19. Anyupdate? It works flawlessly..
  20. disconnected.sqf _id = _this select 0; _name = _this select 1; _pos = getpos _name; hint format ["%1 just left, Last postion was %2",_name,_pos]; What are you trying to do?
  21. Big_Daddy

    Weapon Index

    I've played around with your script some. I don't think there will be a way to reliably get the index number. You'll have to check to see if the unit is carrying hand grenades, mines, and satchels as that is included in the actions. You'd have to get that from magazines. And add it in. Only issue is where to add it. You can't add it at the beginning, or the end i.e. _weapons + _mags. From the limited testing I did, it seemed index 3-4 depending on the primary weapon used was the hand grenades. Possibly, if your remove all weapons, then add them back in a certain order. Something like: grenades satchels mines magazines Primary weapon Secondary weapon Pistol night vision compas etc Then you could add the mags + _weapons, check to see if it has a muzzle (grenades, satchels, mines) then add the modes to that but only if it has a muzzle. so: grenade - 0 grenade - 0 grenade - 0 satchel - 1 primary weapon single - 2 primary weapon burst - 3 secondary weapon single - 4 pistol - 5 night vision - 6 etc
  22. Look in iclient.sqf round line 86: // if the array is empty, anybody can fly, // just add the type of players that can fly if you want to restrict to certain types // for example: d_only_pilots_can_fly = ["SoldierWPilot","SoldierWMiner"]; // this includes bonus aircrafts too d_only_pilots_can_fly = [];
  23. looks like your mixing sqs and sqf.
  24. uhmm. every part of the game is in there. every object, map, everything.
×