Port AGM_Goggles
Goggles was one of my first mods I made so in some places the code is fairly confusing and the use of my own macros makes the code a bit of a nightmare to work with.
There are a couple CBA events from the AGM version:
- GlassesChanged
- GlassesBroken
I currently handle "eye damage" (from explosives and from firing in dirt) by desaturation, I will probably raise an event when the eyes become damaged as well.
There are quite a few global variables used, some of them will be moved to unit variables. This will make goggles teamswitch/zeus friendly. I believe.
TODO:
- [x] Initial port
- [x] Make use of CBA/ACE macros where applicable
- [x] Change to ACE events
- [x] Remove spawns by using PFHs
- [x] Glasses check loop
- [x] Rain loop
- [x] Killed event handler
- [x] Eye damaged PP effect adjustment spawn
- [x] Move the global variables (global to each client) to unit variables
- [x] Fade intensity of glasses over time.
I'd potentially like to change the colour of glasses, so when they get put on, they are initially the same strength as they are currently, then over 5 minutes they slowly fade to about half the strength.
I'd potentially like to change the colour of glasses, so when they get put on, they are initially the same strength as they are currently, then over 5 minutes they slowly fade to about half the strength.
That's an interesting idea.
It should be fairly simple to implement https://github.com/KoffeinFlummi/ACE3/blob/master/TO_MERGE/agm/Goggles/functions/fn_ApplyGlassesEffect.sqf#L30-L35 Just have the same code as in the if statement
_postProcessColour set [3, _postProcessTintAmount/200]; // dividing by 200 makes it half amirite
AGM_Goggles_PostProcess ppEffectAdjust[0.9, 1.1, 0.004, _postProcessColour, [0,0,0,1],[0,0,0,0]];
AGM_Goggles_PostProcess ppEffectCommit 300; // for 5 minutes
AGM_Goggles_PostProcess ppEffectEnable true;
I was thinking exactly the same thing
I will look at porting it as soon as I have a moment to.
Closed via https://github.com/KoffeinFlummi/ACE3/pull/68