Jump to content

ArtVandelay

Member
  • Content Count

    6
  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

About ArtVandelay

  • Rank
    Rookie
  1. Thanks for the responses, considering the network load sending only the changed variable is probably the better idea. Thanks to all of you again
  2. Thanks for responding. That code was just an example (and probably not the best one to give) the real thing is: Yeah problem is, everyone in the area needs to know the current value of TerritoryArray select _territory, to update the capture progress on their HUD. I was thinking of adding publicVariable "TerritoryArray". If spamming publicVariable once per second is far, far too often then I'll have to rethink how to go about updating the HUD. Thanks, -Art
  3. I don't have a proper dedicated server or enough friends to help me test, so I thought I'd better ask. How often is too often to synchronise a public variable? Eg.: while {true} do { ... ... ... MyVehicle = true; publicVariable "MyVehicle"; ... ... sleep 1; }; I'm pretty sure that is far too often and the server would chug along for the entire mission. If so, what would the minimum value for the sleep? I ask because some code that can only be run by the server is needed to update some HUD information for clients. Thanks, -Art
  4. ArtVandelay

    Which version will you be buying?

    I will be buying the alpha edition. If I could buy a boxed copy (containing printed maps, soundtrack on disc etc.) to gain access to the alpha then I'd buy supporter, but considering everything you get is digital ~$90AUD seems a bit steep for me
  5. This works perfectly! Thank you very much, you have no idea the amount of pain and rage you have spared me. Also thanks to everyone who posted! I had no idea invisible walls existed, your advice is invaluable. Regards, Art Vandelay
  6. Hi, Firstly sorry if this has already been asked somewhere else, but I've been searching (and learning!) for the past few days on how to tackle my problem and I've dug up bits and pieces but nothing directly related. Back story: I'm creating an Aircraft Carrier mission using the LHD addon. The idea is that a small team of players infiltrate the carrier using various methods (helicopter, boat, Vodnik etc.). I've created a makeshift base including defences (.50cal MGs and M240 nests) and jerry-rigged some ladders together for players to climb up to the lower walkway below deck (if they decide to approach via sea). There are a group of 15 AI on deck. Now my problem is that when the AI start getting shot at they decide to 'abandon ship' so to speak (rather they run off the edge). What I'm attempting to achieve is when they decide to go for a swim is to teleport them back on deck. My attempt: private ["_group","_unitsAlive","_unit","_units","_unitHeight","_pos","_preferredHeight"]; _group = _this select 0; _pos = _this select 1; _unitsAlive = ({alive _x} count units _group); _preferredHeight = 15.5; //Height of the LHD deck for units while {_unitsAlive > 0} do { sleep 1; _unitsAlive = ({alive _x} count units _group); _units = units _group; for "_i" from 0 to (count _units - 1); _unit = _units select _i; if (isNil _unit) OR (!alive _unit) then { _units set [_forEachIndex, - 1]; } else { _unitHeight = getPos _unit select 2; if (_unitHeight < _preferredHeight) then { _unit setPos [(_pos select 0) - 10, (_pos select 1), 16]; //Get on deck! }; _unitsAlive = ({alive _x} count units _group); }; I'll explain my logic of the script above I created. You may need to hold my hand here a bit - I'm relatively new to Arma scripting. > While the units are alive > Count the amount of alive units > Loop through all units in the group until you last is reached > Check if there is a unit in the array index OR if the unit is dead (if so subtract from array) > Otherwise check the unit's height > If the unit's height is less than the height of the LHD deck (15.5 in this case) move the unit back to starting position > Check if the units of the group are still alive That is my full understanding of what I wrote above. I'm not really sure what I'm doing wrong or where it's going wrong so any help or insight would be very much appreciated. Again, I aplogise if this has been asked before (I did a quick check of the FAQ thread before thread creation). I have tried using various prevention methods (Kronzky's UPS for example) but they continue to bail after being fired at. Art Vandelay
×