ACE3 icon indicating copy to clipboard operation
ACE3 copied to clipboard

Port AGM_Goggles

Open garthdw opened this issue 11 years ago • 5 comments

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.

garthdw avatar Jan 17 '15 07:01 garthdw

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.

nicolasbadano avatar Jan 17 '15 15:01 nicolasbadano

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;

garthdw avatar Jan 17 '15 15:01 garthdw

I was thinking exactly the same thing

nicolasbadano avatar Jan 17 '15 15:01 nicolasbadano

I will look at porting it as soon as I have a moment to.

garthdw avatar Jan 17 '15 16:01 garthdw

Closed via https://github.com/KoffeinFlummi/ACE3/pull/68

garthdw avatar Jan 19 '15 11:01 garthdw