-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
base: develop
Are you sure you want to change the base?
Map Event 606: Checking if an AttachEffect was attached to a Techno #1678
Conversation
- Checks if an `AttachEffectType` was attached into an object. In `mycampaign.map`: ```ini [Events] ... ID=EventCount,...,606,2,0,[AttachEffectType],... ... ```
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. |
There was a problem hiding this 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.
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 |
Discard what I said. I checked your suggestion of putting the event call in CreateAndAttach and works very well. |
…tachedIsUnderAE # Conflicts: # CREDITS.md # YRpp # docs/Whats-New.md
AttachEffectType
was attached into an object.In
mycampaign.map
: