Jump to content

A Bandpass Filter

Member
  • Content Count

    8
  • Joined

  • Last visited

  • Medals

Everything posted by A Bandpass Filter

  1. I'd like to announce to the community the release of my bullet-time/slow-motion mod. This mod is a spinoff of a slow-mo feature that I included in my "The Dude's Fantastic Paintball Adventure" mission; my friends and I enjoyed the feature it so much that I figured others would too. This mod features the following: When in bullet-time, the player gets a temporary health boost. Damage taken while in bullet-time does not impact the player when the effect ends (unless player killed in bullet-time). Player moves faster (relative to all other AI, players, objects) in bullet-time. Bullet-time ability regulated by "recharge delay". "Tracer-vision" feature (optional): Friendlies and enemies fire tracer rounds while in slow-motion (tracer colours are team-specific). AI bullets also travel slower for increased immersion and reaction time. Auto-react feature (optional): Player automatically "reacts" and enter bullet-time when caught unaware by enemy fire. Link to the mod: http://steamcommunity.com/sharedfiles/filedetails/?id=930993237 Latest version (with "tracer-vision"): Previous version (still demonstrates the slow-mo feature nicely): I hope you folks enjoy! Bandpass
  2. A Bandpass Filter

    Replace all mags with tracer mags

    Hey guys, thanks so much for the responses - they have been super helpful! I have managed to successfully implement a script that replaces all mags (including the loaded mag) for all units' primary weapons. I also implemented a second script that resets all units to their original primary weapon magazine loadouts (minus mags spent after converting to tracer mags). The first script works by 1) recording a units' name, current loaded primary weapon mag, and all inventory-stored primary weapon mags into an array (ammoList), and 2) replacing all primary weapon mags with equivalent tracer mags. The second script resets all units' mags to their original state (minus ammo spent while in "tracer mode") by accessing the array (ammoList). Both scripts worked flawlessly with a small number of units, but when I tested with with about 8 to 10 units, the array "ammoList" (during 1st script) does not get populated with all unit info (perhaps only 3 units of 8 total) and thus most of the units' original loadouts do not get repopulated when script #2 is run. I can't seem to spot the flaw in the logic which would prevent the array from populating all unit info... Might anyone here have some insight on the matter? Note that I am trying to integrate these scripts as a feature in a mod I am working on. These scripts exist as two separate .sqf files, which I call separately as execVMs. The two scripts are as follows: Apply Tracers: (Note: I noticed a mini bug in the tracer-colour parsing for the code I posted. This doesn't effect the issue I'm having. I'll update that with the latest code soon) ammoList = []; { _unit = _x; _weapons = weapons _unit; _unitName = name _x; _x = primaryWeapon _unit; _currentMag = ""; _ammoCount = 0; _magList = magazinesAmmo _unit; _magNameAmmoList = []; _currentMag = (primaryWeaponMagazine _unit) select 0; _ammoCount = _unit ammo primaryWeapon _unit; _compMags = getArray (configfile >> "CfgWeapons" >> _x >> "magazines"); _magBaseName = _compMags select {toLower _x find "tracer" < 0}; _magBaseName = _magBaseName select 0; { if (toLower (_x select 0) find toLower _magBaseName >= 0) then { _magNameAmmoList pushBack _x; }; } forEach _magList; ammoList pushBack [_unitName, _currentMag, _magNameAmmoList]; if ([(side _unit),(side player)] call BIS_fnc_sideIsFriendly) then {_tracerColor = "yellow";} else { _tracerColor = "yellow";}; _correctMag = _compMags select {toLower _x find "tracer" > 0}; if (count _correctMag == 0) exitWith {}; if (count _correctMag > 0) then { _tracerSuffix = ""; _tracerList = []; { _magNameArray = toArray _x; _magNameArray deleteRange [0, count (toArray _currentMag)]; _tracerSuffix = toString _magNameArray; _tracerList pushBack _tracerSuffix; } forEach _correctMag; hint format ["%1", _tracerList]; _correctMag = _currentMag + _tracerSuffix; hint format ["%1", _correctMag]; } else { _correctMag = _compMags select {toLower _x find "tracer" > 0}; _correctMag = _correctMag select 0; }; hint format ["%1", _correctMag]; _currentMags = (magazines _unit) select {_x in _compMags}; _nonTracerMags = _currentMags select {toLower _x find "tracer" < 0}; _amount = count _nonTracerMags; {_unit removeMagazines _x} forEach _nonTracerMags; _unit addMagazines [_correctMag, _amount]; hint format ["%1, %2, %3, %4, %5", _unit, _correctMag, _currentMag, _x, _ammoCount]; nul = [_unit, _correctMag, _currentMag, _x, _ammoCount] spawn { sleep 0.1; _unit = _this select 0; _unit removePrimaryWeaponItem (_this select 2); _unit addPrimaryWeaponItem (_this select 1); _unit setAmmo [(_this select 3), (_this select 4)]; }; }forEach allUnits; Reset Ammo: { _unit = _x; _unitName = name _x; _magList = magazines _unit; _totalMagCount = 0; _ammoList = _this select 0; _previousMag = ""; _magNameList = []; _ammoCount = 0; { if ((_x select 0) isEqualTo _unitName) then { _previousMag = (_x select 1); _magNameList = (_x select 2); } } forEach _ammoList; { if (toLower _x find toLower "tracer" >= 0 ) then { _unit removeMagazine _x; _totalMagCount = _totalMagCount + 1; hint format ["%1", _totalMagCount]; } } forEach magazines _unit; for "_i" from 1 to _totalMagCount do { _magName = _magNameList select _i; _unit addMagazine _magName; hint format ["%1", _i]; }; _ammoCount = _unit ammo primaryWeapon _unit; _unit removePrimaryWeaponItem ((primaryWeaponMagazine _unit) select 0); _unit addPrimaryWeaponItem _previousMag; _unit setAmmo [_x, _ammoCount]; } forEach allUnits;
  3. Hello community, I'm wondering if anyone may know of a concise way to script replacement of regular magazines with tracer magazines, including magazines currently loaded into a units' weapon. I think I can achieve this, but it would require parsing a fair bit of weapon/mag varieties. I wonder if there is a universal way to do this... Any help is appreciated. Rgds, Bandpass
  4. A Bandpass Filter

    Replace all mags with tracer mags

    Oh nice - that's going to save a lot of work! Could use this as an interim solution until I come across a generic concise solution (if at all possible). Bandpass
  5. Hello community, I am looking for a way to apply sound filters and/or effects dynamically in a game using a script. For example, upon triggering a trigger, a script is executed which applies a lowpass function (perhaps also adjust pitch) of all following sounds, for a period of time. I am aware of the existence of SoundShader and SoundSets, but I get the impression that these are only used for config of sounds for classes of objects, and are not for dynamic sound adjustments in-game (correct me if wrong). If anyone knows of a way, please do let me know! Bandpass
  6. A Bandpass Filter

    Applying audio filter effects dynamically

    Hey killzone_kid, thanks for the reply. In fact though I was looking more for a way to apply audio manipulation to all in-game sounds, and do so by means of a key-stroke event handler or as a triggered event. Perhaps there is a way by tricking arma into thinking a player is inside of a vehicle (perhaps a custom vehicle config) or inside a building - just really not sure how one would go about doing that. A little while ago I came across a post where you mentioned enableAudioFeature for audio EQ, but I'm not sure that this feature is meant to apply an audio feature on-demand (but rather perhaps to allow or prevent one from occurring as per normal?). I tried applying it without success, but perhaps there's something I missed... If so, I wonder if this could be an alternative way.
  7. A Bandpass Filter

    Applying audio filter effects dynamically

    Thanks for the replies Grumpy, pierremgi. I am wondering though if there is a way to trick the game into applying sound filters similar to existing ones like houseattenuation or underwatereffects, by perhaps creating a new subclass of attenuationEffects or cfgSoundEffects and fooling arma into thinking the player is physically located in an environment in which such sound class would apply (like a vehicle). Any thoughts on how one might go about doing that (if at all possible) or alternative ideas?
  8. A Bandpass Filter

    Help on explosive goat code (dont judge)

    Omg no kidding, I literally made a goat launcher a few weeks ago in a similar way (with attachTo) and as a mod with own goat magazine and goat ammo classes. Played around with launching trucks and hand grenades as well. I found that larger objects (goats and larger) attached to the projectile when using attachTo would lag behind the projectile (hilarious fun nonetheless). The mod version (With official goat ammo) didn't suffer from this comical but sometimes frustrating limitation:).
×