Skip to content

Map Event 606: Checking if an AttachEffect was attached to a Techno #1678

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

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

FS-21
Copy link
Contributor

@FS-21 FS-21 commented May 24, 2025

  • Checks if an AttachEffectType was attached into an object.

In mycampaign.map:

[Events]
...
ID=EventCount,...,606,2,0,[AttachEffectType],...
...

- Checks if an `AttachEffectType` was attached into an object.

In `mycampaign.map`:
```ini
[Events]
...
ID=EventCount,...,606,2,0,[AttachEffectType],...
...
```
Copy link

github-actions bot commented May 24, 2025

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

Copy link
Contributor

@Coronia Coronia left a comment

Choose a reason for hiding this comment

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

checking this in AI() function which is executed for every AE entity per frame is not a good idea, especially there's HasAttachedEffects call which needs to iterate all AEs of an object. Definitely not perf-friendly.

I would suggest to only check it once when the AE is attached to an object, aka CreateAndAttach function to avoid all the per frame calculation. But if you do want to check it per frame, then it'd better to only check the current entity when executing AI(), or adding a standalone function for this in OnEarlyUpdate() which only called HasAttachedEffects once.

@TaranDahl TaranDahl added ❓New feature ⚙️T1 T1 maintainer review is sufficient labels May 27, 2025
@FS-21
Copy link
Contributor Author

FS-21 commented May 29, 2025

We can try the simple instance approach and if I need that frequent AI check (for example for checking an attempt of a FS limpet drone using AE) always I can create & send a new PR for a new Map Event :-P

@FS-21
Copy link
Contributor Author

FS-21 commented May 29, 2025

Discard what I said. I checked your suggestion of putting the event call in CreateAndAttach and works very well.

@FS-21 FS-21 requested a review from Coronia May 29, 2025 05:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs testing ❓New feature ⚙️T1 T1 maintainer review is sufficient
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants