SDL Clickable Node (Alternative) - #460
Merged
Merged
Conversation
This is going to be disallowed because the engine's SceneInputInterface has assumptions that only one LogicMod is attached to any SceneObject. In theory, the engine supports multiple LogicMods per SceneObject, but it's best to not go there.
This node allows the artist to turn on and off a clickable's hotspot based on the value of an SDL integer variable. It's used by Cyan to turn the Neighborhood light garden button clickables on and off using an SDL variable. That kind of thing is the best use for this node. Artists shouldn't use this to turn off clickables while a Responder is running. That runs the risk of a clickable getting stuck disabled if someone crashes while the Responder is running.
Member
|
This definitely looks a bit clearer visually than the screenshots in #458 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an alternate to the SDL Clickable node proposed in #459. This places the SDL variable as an input to the clickable node itself. In the aforementioned PR, the SDL variable and settings were slotted between the clickable and the Responder or PFM to "take ownership" of the clickable to ensure no one else tried to use it and be surprised when the hotspot was disabled. I then realized this could be short-circuited by simply making a different node tree and using the same object as a clickable again.
That led to the question of - well, what really is a re-used clickable? Do they have any value? Based on my understanding - no, they have no value. In practice
plSceneInputInterfacewill only operate on one LogicMod attached to each SceneObject. So having multiple clickables or click-drags attached to a single object is nonsense. Therefore, this PR introduces a generic exclusive claim system such that a single object can only ever have one clickable associated with it. This is potentially a breaking change because nothing was stopping an artist from having the same object in multiple clickable nodes, but those don't make sense anyway. Adding this limitation will make things less surprising.I think this approach is a lot clearer, but there is a danger that artists might start trying to use SDL to turn off their clickables while, for example, a OneShot is playing. That would be non-ideal because the clickable could easily be left in a basically permanently off situation if the player performing the OneShot crashes or force closes the game client during the OneShot.
I am inclined to merge this and close #459, but I will leave this open for feedback.