-
Notifications
You must be signed in to change notification settings - Fork 12
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
Change the way event skip button works to spawn them on any scene #97
Comments
We can make all events's top node be a Event node, which is a custom node that auto initialize the skip button if debug enabled Altho this also mean you cant assign script to top event node anymore (right? it is been a while since I use godot) Which mean the event's script will need to be in a child node |
You can put a script on the top node. All events are already child of |
I dont see how any event is related to EventBase. I checked the #Event folder, all events there have top node be a Control, there is no EventBase there Spawning nodes from code is like one of the most basic thing to do in Godot. I dont 100% remeber the syntax but it literally just
|
Relevant link: As for the checking if event have a proper end, we can just give the event a self.dont_have_proper_end variable, and then we check if this variable exist and is it true, and after than create the skip button? |
This also mean you have to check if the variable exist every time you want to access the variable tho, which you might not want to do. We can also add the have_proper_end variable to BaseEvent (I realized we should name it have_proper_end instead of dont_have_proper_end because dealing with negative bool is annoying) and set it to true by default, and events that dont have proper end can set it to false Sorry for multiple messages |
I don't know where you looked, but all events in |
The scenes that dont have clear end conditions |
Oh so the heal and shop. Shop by default the clear condition will be that there is none and you can leave directly. Heal there will be a clear condition. So we don't actually need to have a I'm also not sure what you mean by "This also mean you have to check if the variable exist every time you want to access the variable", which variable are you talking about ? the I think a solution is to have add a @export button_position: Position = (100,100) # just to put a default
func _ready():
if DEBUG_VAR.DEBUG_VAR_SKIP_BUTTON:
_spawn_skip_button(button_position)
func _spawn_skip_button():
# instantiate the button And then child Event class can override |
yeah that works |
You can take this issue if you want, since I see you assigned and de-assigned yourself. |
This is not needed anymore after #147 is merged, as all events will have an UI and no skip buttons anymore |
Is your amelioration related to a problem? Please describe.
The skip button just exists in placeholder scenes, but we could imagine wanting to skip real scenes for testing purpose. This behaviour is already partially controlled by the
DEBUG_VAR
namedDEBUG_SKIP_EVENT
Describe the solution you'd like
Instead of enabling and disabling a button in some scenes, a solution would be to instantiate through code a button in all the scenes if the skip event debug var is set. It doesn't auto-skip the scene, but you can do it if you want. That way we can skip any scene without needing to update all the different scene files we have
Scenes that don't have a clear end condition yet should have the skip button on by default. I'm not sure how we would do that, as it would mean we need to have a way to say if a certain scene has a proper end condition. Any idea is welcome for this.
Additional context
This needs to be done after #87
The text was updated successfully, but these errors were encountered: