-
Notifications
You must be signed in to change notification settings - Fork 49
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
[Auto PR] New extension: Only Once Condition For Object #281
Conversation
Fixed some descriptions. |
A build error occured while processing the extension update:
|
I don't know what's happening here. 🤔 I renamed the file as instructed by the bot. |
Don't worry about those, I can take care of them |
I updated the extension file. |
!update OnlyOnceConditionForObject.zip |
✅ Successfully updated the extension. |
❗ An internal error has occured. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/1515692205. |
!rebase |
✅ Successfully rebased from main. |
!update OnlyOnceConditionForObject.zip |
✅ Successfully updated the extension. |
!update OnlyOnceConditionForObject.zip |
✅ Successfully updated the extension. |
I'd recommend instead of "Only once" it be named either "Once per instance", "Once per object instance", or "Trigger once per object instance". Without explicitly calling out the "Per Instance" or "Per Object Instance", users may confuse its use case if using the right-click version of the condition/action editor. "Trigger once per object instance" might be the most uniform one that helps people connect it with the existing Trigger Once. (Similar to how a "For Each Object" event is still listed alongside a normal "Event") Description wise, I'd probably recommend updating it to: |
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.
Agree on what @Silver-Streak said. This should be per instance. Also because there is an explicit name requested, I'm not sure it works like a trigger once. A trigger once will work per event and does not need to be reset. So here it should be made clear this should be reset.
Thank you all for your reviews and fixes. I don't know if I'm allowed to fix this, but I did. I've changed "Only once" to "Trigger once". "Only trigger the first time all conditions in this event are true for an object instance." When this condition is checked, it will return false the next time this condition is checked, even if the event was not executed due to other conditions. |
"objectGroups": [] | ||
}, | ||
{ | ||
"description": "Reset the condition of the Condition Name parameter.", |
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.
"description": "Reset the condition of the Condition Name parameter.", | |
"description": "Reset the specified "Trigger once per instance" condition by a the Condition Name parameter.", | |
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.
"objectType": "", | ||
"eventsFunctions": [ | ||
{ | ||
"description": "The condition name of this instance was checked for the first time.\nUnlike the \"Trigger once while true\" condition, this condition stays false until reset.", |
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.
"description": "The condition name of this instance was checked for the first time.\nUnlike the \"Trigger once while true\" condition, this condition stays false until reset.", | |
"description": "The condition name of this instance was checked for the first time.\nUnlike the \"Trigger once while true\" condition, this condition stays false until reset manually with the appropriate action.", | |
It's automatic or not, an innocent user doesn't know it, it must be specified.
I still feel like it's a bit risky because it works differently than the "classic" trigger once. Shouldn't we somehow look at implementing it the same way (this might require advanced stuff in JS)? |
@Bouh , thank you for your review. !update TriggerOnceConditionForObject.zip @4ian , thank you for your review. |
❗ An internal error has occured. See logs at https://github.com/GDevelopApp/GDevelop-extensions/actions/runs/1744651985. |
Whoops looks like my update to the commands broke the update command when used after a rebase command 🤦♂️ |
@arthuro555 Any chance you can fix that? :) |
I'm... Not sure? It's about git refusing to revert a merge commit, and I'm not knowledgeable enough about git to understand what the -m option does exactly, which according to the output message is what's needed to make it work. |
Let's give this a new try: |
✅ Successfully updated the extension. |
934675f
to
0edc57f
Compare
✅ Successfully updated the extension. |
@arthuro555: tl;dr, there is no way to automatically "rebase" after a name change after main was merged. I was about to add a "hard-reset" command that would hard reset to main and add the changes (so any filename change is updated properly :)) but this means anyone can come and hard reset a branch with their changes and "lose" the history made by others. Not great => can we limit a command to maintainers? If some we could add this "hard-reset" command back and just use it when we identify its either the original author or us (maintainers). |
Else, we could remove the rebase command completely, removing any future issues, since it was mostly there to regenerate the header file before merging which has little point now. |
I wonder if avoiding one action is worth introducing a new concept. I'm personally happy handling boolean variables. The "Condition Name" won't have autocompletion for instance. I personally think that there will be more time lost than saved. What is your view on this? |
Hello @PANDAKO-GitHub 👋 A review has started for this extension, but a new option has presented itself in the meantime. We now have a list of unreviewed "Community extensions", and your extension can be added to it, bypassing the review phase. If you chose to not take a review, you need to keep the following in mind:
tl;dr You will not need to do any more work on your extension, but it might not meet the standards of all users, and reach less users. Your case is a bit special, so taking the review will be different for you: since your extension provides such an important feature for GDevelop, if you chose to take the review, the extension might sadly never get added, as the reviewers would prefer a version of this condition that acts more like the normal trigger once, and that cannot be made with a normal extension. The option of taking the review for your would basically mean abandoning the extension and waiting for someone to add it to GDevelop itself, not as an extension. The choice is yours, please tell us how you would like to continue. |
Hi @arthuro555 😊 |
Ok! I'll be closing this submission then. |
This subject is also being discussed here: |
Description
This extension is useful if you want to trigger only once per instance.
This is easier than creating your own instance variables.
In addition, it does not require any action to set it to True.
How to use the extension
Adding the "Only Once Condition" behavior to an object will add the "Only Once" condition to the instance. The condition will be identified by the condition name and will be executed only once.
Unlike the "Trigger once while true" condition, this condition stays true until reset.
Checklist
Example
OnlyOnceConditionForObject.zip
Extension file
OnlyOnceConditionForObject1.0.0.zip