Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eventhandlers - Add Delay to AI Explosion Reaction #418

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

lambdatiger
Copy link

When merged this pull request will:

  1. Add a delay to explosionEH dependent on:
    • Distance from AI
    • Auditory response times
    • AI Skill

@nk3nny
Copy link
Owner

nk3nny commented Oct 18, 2024

I love this. The effect is slight, very slight, but noticable when you know what to look for. I wonder if the logic of sound/distance can be used elsewhere too.

["_explosionSource", objNull]
];

if (!alive _unit ||
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should move/do more of the checks we do in the here before we run the waitAndExecute

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but I think a few of these could change in time:

  • !GVAR(ExplosionEventHandlerEnabled) - should have been there
  • !alive - covers isNull - probably could be replaced with {!(_unit call EFUNC(main,isAlive))
  • {!isNul objectParent _unit} - could be added, but units may be getting in/out and the transition happens in time
  • {(stance _unit) isEqualTo "PRONE"} - a thing that could be changing in that ~0.15-0.3 ms
  • {_unit getVariable [QGVAR(explosionReactionTime), 0] > time} - delay could be computed and then checked against this statement

I'll make the changes I think I made clear I think are good ideas, but for checking if a unit is in a vehicle or is prone I could go either way on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants