Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

2 Neutral

1 Follower

About Rommel

  • Rank
    Master Gunnery Sergeant

Recent Profile Visitors

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

  1. It appears the latest dev build has removed setVehicleInit... thereby completely breaking CBA for now.
  2. Rommel

    Nogova Virus

    Hey all, I've been playing CWA a few times lately with some mates for nostalgic purposes; but for the life of us we could not find a download for the classic mission "Nogova Virus". This was pretty popular with the community, and if anyone has it, an upload to any file sharing site would be welcomed. edit: thanks to the community, here is an upload I found of all 4 missions: http://www.megafileupload.com/en/file/380560/coop-nogova-virus--all-4-missions--noe-zip.html edit2: they were found at this link to start with: http://www.usasquad.com/downloads/servermissions/
  3. *Argh my face* As I've been obligated to respond by a squad member; I must point you to sxp2high's response, which sums it up perfectly. As sxp2high also mentioned, this is very simple to do with a few if statements and a tracked variable. What is a little more complex is doing this in an extensible, non-limiting way. Perhaps as inspiration, I'll give some insight on how nomad worked: if (isdedicated) exitwith {}; waituntil {not isnull player}; waituntil {!isMultiplayer || getplayeruid player != ""}; [ [ /*{deaths player} // handled by nomad */ {typeof player;}, {magazines player;}, {weapons player;}, {typeof (unitbackpack player);}, {getmagazinecargo (unitbackpack player);}, {getweaponcargo (unitbackpack player);}, {getposATL player;}, {damage player;}, {rating player;}, {score player;}, {viewdistance;}, {if(isnil "terraindetail")then{1;}else{terraindetail;};}, {getDir player;}, {rank player;} ], [ { _dayspassed = 1 + time / 86400; _maxLives = nomadRespawns * (nomadReinforcements * _dayspassed); if (_this > _maxLives) then {_disconnect = true;}; }, { if (typeof player != _this) then {_disconnect = true;}; }, { {player removemagazine _x;} foreach (magazines player); {player addmagazine _x;} foreach _this; }, { {player removeweapon _x;} foreach ((weapons player) + (items player)); {player addweapon _x;} foreach _this; player selectweapon (primaryweapon player); }, { if (_this != "") then { player addbackpack _this; clearweaponcargo (unitbackpack player); clearmagazinecargo (unitbackpack player); }; }, { for "_i" from 0 to ((count (_this select 0))-1) do { (unitbackpack player) addmagazinecargo [(_this select 0) select _i,(_this select 1) select _i]; }; }, { for "_i" from 0 to ((count (_this select 0))-1) do { (unitbackpack player) addweaponcargo [(_this select 0) select _i,(_this select 1) select _i]; }; }, {player setposATL _this;}, {player setdamage _this;}, {player addrating (-(rating player) + _this);}, {player addscore (-(score player) + _this);}, {setviewdistance _this;}, { setterraingrid ((-10 * _this + 50) max 1); terraindetail = _this; }, {player setdir _this;}, {player setunitrank _this;} ] ] call rmm_nomad_start; Now, what should be apparent, is that this massive parameter list, is actually making use of the fact code can be data in SQF (a very powerful feature indeed!); and I have essentially passed in several lambdas which act as 'getters' and 'setters'. The 'getters' are the first array of functions, which must return some value. The return value from these functions are then stored in the player state. Upon re-connect, the second array (the `setters`) of first class functions are then called using those saved values as parameter `_this`, and the state restored based on the heuristics in those functions. Example? [ [ /*{deaths player} // handled by nomad */ {getposATL player;}, ], [ {}, // do nothing {player setposATL _this;} ] ] call rmm_nomad_start; This does the simplest functionality possible, it 'gets' the players position every update, then sets it upon re-connection. This design works great for mission makers who want full control over what happens where; and don't want to worry about the funky ArmA 2 network issues. I agree it is a code smell that nomad handles the special case for player respawn/deaths, and if you noticed it, there was also variable `_disconnect` injected into the major example above which can be used to force the player to be disconnected. Hope that helps. PS. As for the player not wanting their old data? Simple solution: Escape -> Respawn.
  4. I wrote a variant on this for my old 'MSO' several years ago, as 'Nomad', despite claims (like the above), the script itself is lightweight and uses as much traffic (if not less) as any network synchronous script in ACE or any other mod which does anything complicated. The traffic itself is controlled by how often the loop is run (1 second is perfectly fine, but if your really worried, >10). If you want to make it a bit more fancy, use a random sleep so that all players aren't synchronously all broadcasting their updates. However, this has been tested with upwards of 30 players on a low end connection and is not a real concern. The functionality as it was originally implemented is simple. A player maintains the following in a loop: _saveStatus = [_name, _position, _direction, _animationChecked, _damage]; _saveGear = [_magazines, _items, _weapons, _backpack, _backpackWeapons, _backpackMagazines, _weaponOnBack, _currentMuzzle]; _string1 = format ["%1_status", getPlayerUID player]; _string2 = format ["%1_gear", getPlayerUID player]; missionNamespace setVariable [_string1, _saveStatus]; missionNamespace setVariable [_string2, _saveGear]; publicVariable _string1; publicVariable _string2; Add a script which when the players starts playing (throw it in init.sqf) that checks for this variable, and if it exists, it runs a set of code which restores the players state from the above variables. Such as: _status = missionNamespace getVariable _string1; if (!isnil "_status") then { player setpos (_status select 1); player setdir (_status select 2); // etc }; Simple. Not scary. Super easy. Not really necessary as an addon.
  5. Unedited, playing around with friends, see http://minus.com/mhbUqdTAF/7f
  6. This is something I use occasionally, its not perfect, but should give you an idea on how you could do it. rmm_action = player addaction ["Get weapon from back", CBA_fnc_actionArgument_path, [0, {_wob = secondaryWeapon player; if (_wob == "") then { _wob = player getvariable "RMM_WeaponOnBack"; player setvariable ["RMM_WeaponOnBack", ""]; player addweapon _wob; }; if (_wob == "") exitwith {}; player selectweapon _wob; }, false]];
  7. Assuming you have done *everything* you have said you have done; and correctly. My guess its the missing semi-colon after _d = getDir HQhawk Script errors enabled?
  8. Java doesn't allow functions like that. At all. It is purely objects. (although not strictly pure OOP) No static functions, only static methods. So maybe, as it were, it could be: sqf.setdamage(object, value); Maybe allowing easier porting of code.
  9. Rommel

    20km VD..sweet

    Depends on the Object LOD at that view distance. ;)
  10. I think in overall usage by the community and mission makers at large, improvement of HOLD or a new DEFEND waypoint would be the most used.
  11. Server: Object 5:0 not found (message 121) Cause: ? Solution: ? When this occurs it can be duplicated anything from a small number of entries to hundreds of times The object reference number and message number often changes The cause for this was quite commonly from throwing grenades, rockets, or anything that appears to be created on a fired event then deleted shortly after. Occurs also with createVehicleLocal objects that are forced global IIRC; maybe inter-related incidents. Solution? Don't play? :P; none known.
  12. Rommel

    Japan hit by 9.0-magnitude earthquake and tsunami

    You make it sound as if the whole thing is one big conspiracy, and the media is all lying to us.