Jump to content

champ-1

Member
  • Content Count

    434
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by champ-1

  1. I think this function is flawed. Because it shows different altitude of sun setting at different time of year.
  2. Here's script based on your measurments. Still dark as hell during overcast and heavy rain and bright as day during full moon clear sky. So I guess you were wrong about weather not affecting visibility with aperture. _angleArray = [999, 30, 20, 0, -5, -15, -18, -19, -999]; _apertureArray = [60, 60, 40, 20, 10, 8, 7, 6, 6]; _debug = true; CH_brighterAperture = 50; // +50% aperture brightness CH_adjustAperture = true; // resets aperture to default value CG_fnc_sunAngle = { /* Original author: CarlGustaffa Additions: zapat Description: []: Returns the suns altitude for current day and hour of the year on any island (whos latitude may differ). [number]: returns the hour when given angle is happening. Eg. when is it sunrise. Returns: Suns altitude in degrees, positive values after sunrise, negative values before sunrise. */ private ["_lat", "_day", "_input", "_angle", "_temp", "_hour"]; _lat = -1 * getNumber(configFile >> "CfgWorlds" >> worldName >> "latitude"); _day = 360 * (dateToNumber date); _input = _this; if (count _input > 0) then { _angle = _input select 0; _temp = acos((_angle + (24 * sin(_lat) * cos(_day)) ) / ((12 * cos(_day) - 78) * cos(_lat))); _hour = (_temp / 360) * 24; _hour } else { _hour = (daytime / 24) * 360; _angle = ((12 * cos(_day) - 78) * cos(_lat) * cos(_hour)) - (24 * sin(_lat) * cos(_day)); _angle }; }; while {true} do { if (CH_adjustAperture) then { _angleCurr = [] call CG_fnc_sunAngle; for "_i" from 0 to (count _angleArray - 1) do { _angleSel = _angleArray select _i; if (_angleSel < _angleCurr) exitWith { _anglePrev = _angleArray select (_i - 1); _aperturePrev = _apertureArray select (_i - 1); _apertureCurr = _apertureArray select _i; _apertureIntp = _aperturePrev + ( (_angleCurr - _anglePrev) / (_angleSel - _anglePrev) ) * ( (_apertureCurr - _aperturePrev) / 1 ); _adjustFormula = (_apertureIntp - ((_apertureIntp / 100) * CH_brighterAperture)); _apertureAdjusted = if (_adjustFormula < 0) then {0} else {_adjustFormula}; if (_debug) then { hint format ["%1 %2\n%3 [%4] %7\n%5 %6", _anglePrev, _aperturePrev, _angleCurr, _apertureIntp, _angleSel, _apertureCurr, _apertureAdjusted]; }; if (_angleCurr < -10) then { setAperture _apertureAdjusted; } else { setAperture 0; }; }; }; } else { setAperture 0; }; sleep 1; };
  3. Alright, thanks. I'll try to make some stuff and post it here if it works. I guess mission makers shoud take note of this and add "setAperture 0" in the init file. By the way, I heard Epoch guys made some feature that allows "eyes adjust to light". Never played it though, don't know how good it is. ---------- Post added at 23:38 ---------- Previous post was at 23:33 ---------- I guess if you'd make this script into the mod version, you could possibly resolve issue with aperture carrying into other missions. Right?
  4. "sunOrMoon" there to gradually disable effect of increased apperture in the morning.I will check out that function. So you saying aperture adjustments are not made automaticly based on current illumination level? Is it just depend on sun position? That's pretty weird to me.And by the way how do you measure aperutre? :rolleyes:
  5. How to hide a zone marker with this script?
  6. Well, you enter respawn time for the vehicle and if you set this option to 'true' script will delete editor unit and spawn it after random delay (no longer than respawn time). Or something like that. I don't think you should give TOO much customization to user, otherwise it will be too hard to setup. I think it should be either/or, but your evaluations are pretty good too. Except one thing, why do you need this small circle? What's bad about vehicle reseting to 0 damage / full ammo / original pos? For example, you have a jet in a hangar, you take it and fly for a bit, then come back to the base and drive it back to the hangar. You can't park it inside because jets can't go backward from hangar, so it's just hanging in this small no-reset circle near the hangar and cluttering the base. Not that great, right?
  7. - ability to delay first spawn of the vehicle (at the mission start); - ability to set array of custom vehicles, random one of which will be picked every respawn. So it's different vehicle every time; - feature that automaticly copies current vehicle's init line into new spawned vehicle; - additional init parameters for newly spawned vehicle; - ability to choose what determines if vehicles is abandoned: distance from original spawn or time its not being used.
  8. After this error cache system stops working completely: arma3 2014-11-02 23-31-28-620
  9. champ-1

    Stuck on loading screen

    I checked all files yesterday, still stuck on loading screen. I tested without any mods, still stuck. I exported only these sectore modules to the new mission. Still stuck in that mission too. Anyway, this module seems to be completly broken. I wrote my own script for that purpose already. Thanks Obama!
  10. champ-1

    Stuck on loading screen

    It usually happens after some sector is captured. Try to capture couple of them. Or just delete the first trigger (opfor present), mission stucks on loading without it for me.I don't have any other scripts and will try it without any mods now. ---------- Post added at 19:55 ---------- Previous post was at 19:47 ---------- No mods, no scripts, same mission I posted here. Stuck.
  11. champ-1

    Stuck on loading screen

    Yeah, here you go. I removed code that disables simulation of sector module, maybe it was the problem. But it wasn't. Also, I couldn't even load the mission without that first trigger on the spawn.
  12. champ-1

    Stuck on loading screen

    Wat? How is that suppose to help?
  13. champ-1

    Stuck on loading screen

    Same here. My game just locks itself during the mission. I setup series of sector modules to capture one after another, but after 3-5 minutes spent in sectors my game just locks itself - loading screen shows up, but I still hear ingame sounds. Nothing never loads from that screen, and I can't cancel it. Have to kill game process every time. Any ideas why this is happening? My guess it might be I run out of some sort of tickets and win the game but it glithes out, though I don't even have "sector control" module. Also it might be because I disable simulation for previous captured sectors so enemy couldn't recapture them again. Maybe they glitch out because of that.
  14. champ-1

    The new Sector Module

    I have very weird problem guys. My game just locks itself during the mission. I setup series of sector modules to capture one after another, but after 3-5 minutes spent in sectors my game just locks itself - loading screen shows up, but I still hear ingame sounds. Nothing never loads from that screen, and I can't cancel it. Have to kill game process every time. Any ideas why this is happening? My guess it might be I run out of some sort of tickets and win the game but it glithes out, though I don't even have "sector control" module. Also it might be because I disable simulation for previous captured sectors so enemy couldn't recapture them again. Maybe they glitch out because of that.
  15. Same here.If I launch game from Arma3Sync I can't use Push-to-Talk in TS3. Otherwise it works fine.
  16. Adding condition to while loop makes it unreliable for some reason. Some old bug I guess.
  17. Here's my garbage collector script. Pretty simple one, but it only removes one object. After that it runs just fine, marks objects for deletion and stuff. But it doesn't remove them. I'm mindfkd, I don't understand what could be wrong. Obviously, no errors in-game or in .RPT file. Help me out, guys. _timer = 16; _deleteBeyond = 1500; CH_fnc_markedForDeletion = { _obj = _this select 0; _timer = _this select 1; _deleteBeyond = _this select 2; if (_obj getVariable ["CH_markedForDeletion",false]) exitWith {}; _obj setVariable ["CH_markedForDeletion",true]; sleep _timer; while {true} do { private ["_nearPlayer"]; _nearPlayer = false; { if (isPlayer _x && _x distance _obj < _deleteBeyond) exitWith { _nearPlayer = true; }; } forEach playableUnits; if (!_nearPlayer) exitWith { deleteVehicle _obj; }; sleep 10; }; }; while {true} do { if (isServer) then { { [_x, _timer, _deleteBeyond] spawn CH_fnc_markedForDeletion; } forEach allDead; }; { [_x, _timer, _deleteBeyond] spawn CH_fnc_markedForDeletion; } forEach nearestObjects [player,["WeaponHolder","GroundWeaponHolder","WeaponHolderSimulated"],300]; sleep 10; }; ---------- Post added at 15:14 ---------- Previous post was at 13:22 ---------- The problem was dead player's body had the same name as all the other dead bodies of the same player, as well as the body of live player. This seems to work: CH_garbageCollectorArray = []; CH_fnc_garbageCollector = { _obj = _this select 0; _timer = 300; _deleteBeyond = 1600; if (_obj in CH_garbageCollectorArray) exitWith {}; CH_garbageCollectorArray set [count CH_garbageCollectorArray, _obj]; sleep _timer; while {true} do { private ["_nearPlayer"]; _nearPlayer = false; { if (isPlayer _x && _x distance _obj < _deleteBeyond) exitWith { _nearPlayer = true; }; } forEach playableUnits; if (!_nearPlayer || isNull _obj) exitWith { CH_garbageCollectorArray = CH_garbageCollectorArray - [_obj]; if (!isNull _obj) then { deleteVehicle _obj; }; }; sleep 10; }; }; while {true} do { if (isServer) then { { [_x] spawn CH_fnc_garbageCollector; } forEach allDead; }; { [_x] spawn CH_fnc_garbageCollector; } forEach nearestObjects [player,["WeaponHolder","GroundWeaponHolder","WeaponHolderSimulated"],300]; sleep 10; };
  18. champ-1

    STI Addons

    Yeah, also there are some errors if you cancel rearming. I'm unable to use Service Menu after that. And I have some errors when shooting main gun from hangar. It saying some indoor sounds are missing. ---------- Post added at 17:47 ---------- Previous post was at 17:42 ---------- By the way, it would be nice if you could put pilot a little more back in the seat. It seems like dashboard a little bit too close to the face compared to other planes.
  19. I think you can blow up any explosive just by dealing damage to it. You can get missile object via Fired Event Handler and then just setDamage 1 to it. ---------- Post added at 10:16 ---------- Previous post was at 10:05 ---------- Nevermind, you can't do that.
  20. champ-1

    CCIP script for aircrafts

    I found selection name, but I guess not every weapon has it. JS_JC_FA18E_ccipProvider.sqf _allowedWeapons = [ "js_w_fa18_m61", "js_w_fa18_GBU12LGBLaucher", "js_w_fa18_GBU38BombLauncher"]; _gatlinInfo = {_this selectionPosition "nosegun"}; _gbu12 = {[0,0,0]}; _gbu38 = {[0,0,0]}; _pairs = []; _pairs = [_pairs,"js_w_fa18_m61",_gatlinInfo,false] call BIS_fnc_addToPairs; _pairs = [_pairs,"js_w_fa18_GBU12LGBLaucher",_gbu12,false] call BIS_fnc_addToPairs; _pairs = [_pairs,"js_w_fa18_GBU38BombLauncher",_gbu38,false] call BIS_fnc_addToPairs; [_allowedWeapons, _pairs]; How do I do that?I thought I have some basic understanding of scripts, but what you are saying doesn't make any sense to me. lol
  21. champ-1

    CCIP script for aircrafts

    Yeah, I get that. I don't understand where I'm suppose to get selection names, like "Gatling_barrels_end", "Rocket_2", "Rocket_1". Also, I have no idea which function are you talking about, that returns position of weapons. :\
  22. champ-1

    CCIP script for aircrafts

    Has anyone did presets for other planes? Not sure where to get selection names for different planes. So I can't do it myself. ---------- Post added at 13:01 ---------- Previous post was at 12:51 ---------- Also, what about jets where you can change loadouts? Are they gonna work with this, because positions of bombs may vary.
  23. champ-1

    STI Addons

    Could you please make short description (on HUD) more... hm descriptive? For example: Full description: AGM-65/K (CCO) Short: AGM-65/K. Seriously, what's the purpose of that? Wouldn't it be better if you put "AG IR Lock Missle" or something like that? Because not everyone knows all the missiles by their names. Also when you select AGM-65K missile there is a thermal image displaying on the HUD. What is for? Is there a way to display it full screen or something? Cool mod, btw. Thanks.
  24. Here is a little script I made: while {true} do { waitUntil {sleep 0.00051; vehicle player != player && cameraView == "EXTERNAL"}; _curr_camera = cameraView; player switchCamera "Internal"; player setVariable ["camera_view_saved",true]; if !(player getVariable "camera_view_saved") then { [_curr_camera] spawn { _curr_camera = _this select 0; waitUntil {sleep 0.00051; vehicle player == player}; player switchCamera _curr_camera; player setVariable ["camera_view_saved",false]; }; }; }; I have a problem though. If you enter vehicle in 3rd person, vehicle starts skipping all over the place. If you do same thing in first person cam, vehicle moving as smooth as always. I have no idea why its happening. It doesn't happens when i run only this part: while {true} do { waitUntil {sleep 0.00051; vehicle player != player && cameraView == "EXTERNAL"}; };
×