Twine Version: 2.3.15
Story Format: Sugarcube
I’m trying to make it so that a link in an svg file is only visible once the player has visited a certain passage more than once. I’ve tried $.wiki(’<<if visited(“Passage”) == 2>>’) method but it doesn’t seem to work… is there another work around for this?
(eventually I’ll get rid of the inkscape formatting and figure out how to make the link colour dynamic)
<div class="svg-container"><svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" class="svg-content" viewBox="0 0 2000 1000"
preserveAspectRatio="xMidYMin meet" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg
width="210mm"
height="297mm"
viewBox="0 0 210 297"
version="1.1"
id="svg5"
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
sodipodi:docname="drawing.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<g
class="layer" display="inline">
<path
style="fill:none;fill-opacity:0.0294118;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0"
d="m 12.169627,93.59226 c 8.437794,-13.447736 -0.626049,1.229484 14.401366,-25.293854 2.930239,-5.171864 5.324723,-10.722555 8.996695,-15.397073 9.351711,-11.904974 27.56698,-22.482815 42.405869,-26.07493 4.367067,-1.057157 7.046293,-1.297479 11.4579,-1.150572 4.457067,0.14842 5.478931,0.877104 9.961221,0.439649 1.603592,-0.156505 3.147962,-0.698286 4.739482,-0.949455 4.33292,-0.68381 6.54712,-0.629123 10.72619,-1.463938 3.73038,-0.745185 7.59478,-1.79184 11.14193,-3.171086 4.09074,-1.590609 8.25654,-2.864688 12.37254,-4.359074 1.13178,-0.410914 0.6144,-0.457768 1.28049,-0.509805"
id="path7986" />
<a id="svg_31" onclick="$.wiki('<<goto [[Start]]>>')" > <text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#6688dd;fill-opacity:1;stroke:none;stroke-width:0.264583"
id="text11554"><textPath
xlink:href="#path7986"
id="textPath15231"
style="fill:#6688dd;fill-opacity:1">I belong</textPath></text></a>
$.wiki('<<if visited("Concrete") == 2>>')
<path
style="fill:none;stroke:#000000;stroke-width:0.264583px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 25.230581,17.661408 c 7.093897,1.659748 56.292546,0.71698 63.436893,2.162622 19.806236,4.007746 21.467416,10.742883 27.753646,16.580096 8.13987,7.558458 10.4304,24.237127 15.13835,34.241504 2.76235,5.870009 9.47772,9.023932 14.41747,12.975728 10.11649,8.093196 2.74618,3.04211 14.05704,10.452671 4.28868,2.809825 38.30561,0.720877 43.25242,0.720877"
id="path35695"
sodipodi:nodetypes="csssssc" />
<a id="svg_31" onclick="$.wiki('<<goto [[Start]]>>')" ><text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.5833px;line-height:1.25;font-family:sans-serif;fill:#6688dd;fill-opacity:1;stroke:none;stroke-width:0.264583"
id="text37503"><textPath
xlink:href="#path35695"
id="textPath40468"><tspan
id="tspan37501"
style="fill:#6688dd;fill-opacity:1;stroke-width:0.264583">I learned a lot from this unpleasantness</tspan></textPath></text></a>
$.wiki('<<endif>>') */<
</g>
</svg>
</div>