Skip to content

SDL Clickable Node (Alternative) - #460

Merged
Hoikas merged 3 commits into
H-uru:masterfrom
Hoikas:sdl_clickable_node2
Jul 21, 2026
Merged

SDL Clickable Node (Alternative)#460
Hoikas merged 3 commits into
H-uru:masterfrom
Hoikas:sdl_clickable_node2

Conversation

@Hoikas

@Hoikas Hoikas commented Jul 20, 2026

Copy link
Copy Markdown
Member
image

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 plSceneInputInterface will 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.

Hoikas added 3 commits July 18, 2026 12:25
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.
@Hoikas Hoikas added the feature label Jul 20, 2026
@dpogue

dpogue commented Jul 20, 2026

Copy link
Copy Markdown
Member

This definitely looks a bit clearer visually than the screenshots in #458

@Hoikas
Hoikas merged commit 4dcf577 into H-uru:master Jul 21, 2026
3 checks passed
@Hoikas
Hoikas deleted the sdl_clickable_node2 branch July 21, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants