I'm using Twine 2.2.1, Sugarcube 2.21.0, and w3.css.
I am writing a widget called <<speak>> to display a character's image with their dialog next to it. I already have widgets predefined such as <<friend>> and <<foe>> which display the appropriate image, but am struggling to pass that character widget name into <<speak>>.
For example, I would like to use <<speak "foe" "You shall die!>> to render a picture of the Foe (using the <<foe>> widget) with the words "You shall die!" next to it.
Here is my <<foe>> widget (which works perfectly by itself):
<<widget "foe">><img data-passage=foeImage alt="Foe" class="w3-animate-zoom w3-padding-small hvr-float img-float-left"><</widget>>
Here is my <<speak>> widget (which currently does not display the image, just the dialog text):
<div class="w3-col" style="width:100px">
<<$args>> /* display the image using a pre-defined widget*/
<p><<print $args>></p> /* display the dialog */
My widget, as written, displays the following on the screen:
<<foe>> You shall die!
I would kindly accept any help anyone can offer.