Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

[Twine 2.1.3] [Sugarcube 2.18] Using Replace on a Span inside an added 'Sidebar'

$
0
0
Okay, I actually have new visible areas appearing already, but not working yet. I have, specifically, 4 new areas: a condition pane at the top, Status down the side, a navigation map in the lower right, and a space across the bottom for Actions.
My initial thought was to have the Status bar updated by PassageDone (that part isn't hard to get working, and I've already got it running smooth in another test).
For the rest of them, however, I had intended to simply have a <Span id=""></span> inside of each, which would be updated by passages when they were loaded, or when choices were made through the available actions.
My initial foray into this proved a little infuriating, as the game itself did not recognize the Span ID inside the new areas. I got the following error message:
Error: <<replace>>: no elements matched the selector "#HUDaction"

Now, I get that this is the game itself failing to check the new areas for the element, but is there some way to get it to, or to get around this? My main idea in migrating to this more separated interface was to simplify the confetti-bomb-style code that I've BEEN writing, and to make the look of the game more consistent. ...lord, I hope this is just some dumb little missed symbol on my part and not eightyseven pages of complex, unfamiliar code...

In case it might help at all, I'm including the actual project file that I'm using to build the interface; the rest of the game is in it's own (very messy and ugly) version of the project file, so this is ONLY the interface and my effort at updating the Actions bar.

(I do have to thank Greyelf for the new area code, as I found it in a couple of their posts. Various other bits and pieces lying around are thanks to Madexile and Claretta. No, it's not for profit, it's for fun, learning, and staying sane at work.)

Viewing all articles
Browse latest Browse all 1844

Trending Articles