Jump to content

Bon

Member
  • Content Count

    556
  • Joined

  • Last visited

  • Medals

Posts posted by Bon


  1. Taking the opportunity I want to offer you my way of filling a crate. It has three major advantages:

    1. It is easier to modify in means of adding and removing content.
    2. Minimum of redundant code.
    3. You do not have to take care anymore about amount of weapons and magazines to put in the crate and whether you put in too much or too less. It puts as much stuff in it as possible, leaving a little room for the case.

    It also cleans up all the stuff that gathers around the cache during playtime.

    // by Bon_Inf*
    
    _cache = _this select 0;
    
    
    _weapons = [
    "M14_EP1","M16A2",...
    ];
    _magazines = [
    "20Rnd_762x51_DMR","20Rnd_762x51_B_SCAR",...
    ];
    
    
    _weaponcapacity = 0 max getNumber (configFile >> "CfgVehicles" >> typeOf _cache >> "transportMaxWeapons") - 100;
    _magazinecapacity = 0 max getNumber (configFile >> "CfgVehicles" >> typeOf _cache >> "transportMaxMagazines") - 100;
    
    
    while {alive _cache} do {
    {deleteVehicle _x} foreach nearestObjects [position _cache,["WeaponHolder"],50];
    clearMagazineCargo _cache;
    clearWeaponCargo _cache;
    
    {
    	_cache addWeaponCargo [_x, floor(_weaponcapacity / (count _weapons))];
    } foreach _weapons;
    
    {
    	_cache addMagazineCargo [_x, floor(_magazinecapacity / (count _magazines))];
    } foreach _magazines;
    
    // restock time.
    sleep 1800;
    }; 
    

    hf.


  2. Bon 1.01 version has bug with the dragging animation for the revive script, you are able to drag someone but when you drop them they seem to get stuck in the drag animation once stuck in the animation you are unable to revive them.

    Thx Pauld, fixed.

    How does one call in Arty? Also, are you working on a BAF version?

    Do not recruit more than 4 soldiers in total. Go to the area on the airfield marked for artillery (check ingame notes). There you can use the construction interface to set up some howitzers. Man the built guns with your AI, then you will get an action menu entry to call in artillery. For the rest, check post #61.

    And a clear NO on a BAF version (at least from my side).

    hf.


  3. 1.

    its because of your double quotes. Should look like

    _unit setVehicleInit "nul=[this, 'WestFactory', 'nofollow', 'ambush', 'nomove'] execVM 'scriptsupsmon.sqf'";
    

    2.

    there is no need to use setvehicleinit at all. this does it already:

    _unit = _group_1 createUnit ["RU_Soldier_SL",_createpos, [], 0, "NONE"];
    ...
    nul=[_unit, "WestFactory", "nofollow", "ambush", "nomove"] execVM "scriptsupsmon.sqf";
    

    3.

    I think you need the additional parameter "spawned" for the UPSMON script to work properly with dynamically created units. Probably only matters if creating more than just one group, but, just in case...


  4. I always wondered why mounting an air vehicle is not restricted to pilots only. I mean, why having such pilot units anyway? Same with heavy armor and crewmen.

    Or why ammo crates containing OPFOR weapons can also accessed by BLUFOR and the other way around.

    And I always answered to myself: why restricting it in the first place, when it can be arranged by the mission makers themselves...

    Like better to have all the freedom and the possibility to arrange things with scripts, than hardcoded restrictions nobody can work with at all.

    Now, this IED concept really confuses me.

    AddOns for one single item or concept suck.

    totally agree.


  5. Regarding Takistan the first thing that comes to mind is flat and empty areas. For example there should be always some flat (say below 0.15° gradient) and empty space (radius > 10m) near a town. In Takistan, the next flat, empty and big enough area might be thousands of meters away, which makes it quite hard to spawn random buildings such as tents, a small camp or what not "there".

    Similarly there should always be nice flat and empty areas every now and then, be it a clearing, in the swamps or in the mountains. Again, I'd like to later find such areas with scripting to spawn camps and stuff.[...]

    +1. Definitely.


  6. Hi all,

    just saw the new OA beta patch comes with the commands to query a cargo space for weapons and magazines - at last :yay: :yay: :yay:

    So first thing I did I scripted the possibility to save the current loadout including OA backpack and its content.

    1. create a script file and name it player_respawn.sqf. Write into it the following code:
      WaitUntil{not isNull player || isDedicated};
      
      player addEventHandler ["Killed",{
      player spawn {
      
      	_unit = _this;
      
      	private ['_magazines','_weapons','_backpack','_backpackweap','_backpackmags'];
      	if(isNil "savedloadout") then {
      		_weapons = weapons _unit;
      		_magazines = magazines _unit;
      		_backpack = typeOf unitBackpack _unit;
      		_backpackmags = getMagazineCargo unitBackpack _unit;
      		_backpackweap = getWeaponCargo unitBackpack _unit;
      	} else {
      		_weapons = savedloadout select 0;
      		_magazines = savedloadout select 1;
      		_backpack = savedloadout select 2;
      		_backpackmags = savedloadout select 3;
      		_backpackweap = savedloadout select 4;
      	};
      
      	WaitUntil{alive player};
      
      	removeAllWeapons player;
      	removeAllItems player;
                     removeBackpack player;
      	{player addMagazine _x} foreach _magazines;
      	{player addWeapon _x} foreach _weapons;
      	if (primaryWeapon player != "") then {
            			player selectWeapon (primaryWeapon player);
              	_muzzles = getArray(configFile>>"cfgWeapons" >> primaryWeapon player >> "muzzles"); // Fix for weapons with grenade launcher
      	        player selectWeapon (_muzzles select 0);
      	};
      	if(_backpack != "") then {
      		player addBackpack _backpack; clearWeaponCargo (unitBackpack player); clearMagazineCargo (unitBackpack player);
      
      		for "_i" from 0 to (count (_backpackmags select 0) - 1) do {
      			(unitBackpack player) addMagazineCargo [(_backpackmags select 0) select _i,(_backpackmags select 1) select _i];
      		};
      		for "_i" from 0 to (count (_backpackweap select 0) - 1) do {
      			(unitBackpack player) addWeaponCargo [(_backpackweap select 0) select _i,(_backpackweap select 1) select _i];
      		};
      	};
      };
      }];
      


      Then write into your init.sqf:

      [] execVM "player_respawn.sqf";
      


      That works already in a sense the player respawns with the loadout she/he died before.

    2. Now you can optionally create another script, let's name it saveloadout.sqf, and write into it the following code:
      _unit = _this select 1;
      
      _weapons = weapons _unit;
      _magazines = magazines _unit;
      _backpack = unitBackpack _unit;
      _backpackmagazines = getMagazineCargo _backpack;
      _backpackweapons = getWeaponCargo _backpack;
      
      savedloadout = [_weapons,_magazines,typeOf _backpack,_backpackmagazines,_backpackweapons];
      
      hint "current loadout saved";
      


    3. Add an action for saving ones current loadout to, lets say, an ammocrate, by writing into the crates init line:
      this addaction ["save loadout","saveloadout.sqf"];
      


    hf.


  7. someAmmo does not trigger somehow. Find another way to detect there's no ammo left.

    How about checking for:

    _goodmagazines = getArray (configFile >> "CfgWeapons" >> primaryWeapon _unit >> "magazines");
    if({_x in magazines _unit} count _goodmagazines == 0) then ...
    

    And put in a sleep into your while loop. Running the code on each frame is not necessary.


  8. changelog

    • FIXED: marking fuel dump in resp. mission does not work sometimes.

    Updated link in the first post.

    Am sorry guys,

    frequent updates are absolutely not my kind of thing. However, this one little fix is more than necessary, and the last one for at least the next six weeks.

    After that I am going to focus on scripting new tasks for this mission.

    Hf.


  9. Confirming that,placed 3 strobes,lased it with the Designator,constructed me own arty and fired on it several times ... no worky at all

    Weird.

    You need to be closer than 50m to the fuel dump, then throw the IR Strobe.

    I confirm that, after testing it several times the other day, sometimes the eventhandler does not detect the player throwing the IR Strobe, but then I tried it again and latest after the third attempt it told me the dump is marked successfully.

    Scripting a workaround will become very dirty...

    ...but I am on it (since I never saw any other mission yet that makes use of those little new Strobe thingies in OA)...


  10. changelog

    • FIXED: enemy reinforcements remain at their spawn position
    • FIXED: mission "investigate -> destroy firebase" does not check for deathcount
    • FIXED: cache at "destroy cache" mission fails to set position into a house
    • FIXED: parameter for disabling advanced vehicles (tank, apc) does not work
    • FIXED: enemy snipes you out of vehicles easily
    • FIXED: enemy reinforcements spawn inside the AO when no player is near
    • CHANGED: adjusted enemy strength
    • CHANGED: locked enemy air vehicles
    • CHANGED: position of IEDs relative to the road now varies a bit; detonation radius of IEDs increased
    • CHANGED: UH-60M can load ammoboxes, too.
    • ADDED: mission "mark a fuel dump with an IR-Strobe"
    • ADDED: KSK Machinegunner to recruitable units
    • ADDED: ACE2 edition by Jack

    Updated link in the first post.

    I also renamed the mission from "Takistan Force" just to "TFOR", so that it fits into the mission name field in the server browser, and because I think the new name is much more distinctive than the former one. So don't be :confused:

    Hf.


  11. @palanoid:

    Thanks for the report. There were some other reporting the same thing, however, nobody could tell me if this happens in other missions as well or if it only occurs in Takistan Force.

    So I checked it and it indeed has its cause in the damage handler I am using - was assuming the damage handler assigned to a soldier unit sticks only to the soldier unit, instead, it carries over to a vehicle the player jumps in. Will be fixed in the next update.

    @Turin:

    1. The radius certain objects are placed within depends on the size of the location, actually, I never had any problems finding things EXCEPT this stupid cache. Here the reason is yet another bug, not a too huge spawn radius. The engine sometimes fails in placing the cache in a house, maybe of not enough room for the cache at the building position. Then the cache is transferred without any notification or error message to position [0,0,0] somewhere out in the desert. In this case you can search for days with no luck.
      Will be fixed in the next update.
    2. I don't agree. My clanmates prefer playing with up to 12-man-squads and think that it is then still well-balanced. The server starting to lag though is an issue depending on the average number of players playing on a server and of course the server specs. So best imao is to stick with letting the server admin decide. Besides, take 20 players on Takistan Force each running around with 11 AIs, still less lags than you'd have in Warfare.
    3. Take a look at the following screenshots, tell me what you think:
      amount enemies 1 player playing
      amount enemies 10 players playing
      amount enemies 20 players playing
      It indeed is pretty easy to adjust it, just changing some integers in the config file of the mission.

    @SnR:

    How am I to eliminate the need for crates mate? :confused:

    Even if most of the loadout presets are not everyone's taste, I think that is already a pretty good approach.


  12. Glad you like the mission guys.

    @Pauld: yeah, that's an ArmA issue, exists longer than I play the game. And regarding to captured enemy aircrafts - won't be possible anymore by the next update.

    BTW all of you, this mission has its space now on dev-heaven.net:

    http://dev-heaven.net/projects/takistan-force

    Please report bugs or other issues as well as suggestions to this platform, as it is way more effective.

    You can easily sign in as "guest" (password is "guest", too) and submit new issues in the "New issue" section. Thanks.

    Hf.


  13. changelog:

    • FIXED: indestructible cache at "destroy cache" mission
    • FIXED: IEDs not defusable
    • FIXED: convoy in "stop convoy" mission does not get waypoints at all
    • FIXED: rallypoint markers disappear for no reason sometimes
    • FIXED: Injury System lets you die two times at once sometimes
    • CHANGED: improved enemy presence in "escort the truck" mission
    • CHANGED: missions now take place at locations closer to each other
    • CHANGED: removed the two closest locations to the base
    • CHANGED: moved all assets a bit closer to the respawn position
    • CHANGED: increased overall amount of enemies.
    • ADDED: now two versions: TFOR S (southern airfield) and TFOR N (northern airfield)
    • ADDED: automatic removal of rallypoints after a mission
    • ADDED: mission "relieve ambushed friendly forces"
    • ADDED: FOPs/FARPs as additional respawn and resupply points
    • ADDED: CH-47 Helicopter can lift cars
    • ADDED: notifications of how many lives remain for the team
    • ADDED: medic tent, HMMWV ambulances, MEV MH60
    • ADDED: ammo truck can load and unload ammoboxes at vehicle Service Points

    Updated link in first post.

    Hf.

×