Twine Version:
[also choose a Story Format tag above]
2.6
So I’m trying to insert my images in dialogue boxes (The macro I’m using for it is here: custom-macros-for-sugarcube-2/dialog-api-macro-set.md at master · ChapelR/custom-macros-for-sugarcube-2 · GitHub) Using a folder with images in my game folder. And for some reason no matter what I do the images don’t show up even though i followed the code right.
This is the code I used for file location (Sample Code) So my images appear when I press play/test.
This is my java script code:
if (document.location.href.toLowerCase().includes(“/temp/”) || document.location.href.toLowerCase().includes(“/private/”) || hasOwnProperty.call(window, “storyFormat”)) {
// Change this to the path where the HTML file is
// located if you want to run this from inside Twine.
setup.Path = "C:\\TrueFolder\\Twine\_index"; // Running inside Twine application
} else {
setup.Path = ""; // Running in a browser
}
setup.ImagePath = setup.Path + “images/”;
setup.SoundPath = setup.Path + “sounds/”;
This is my code in StoryInit:
<<set _imag = setup.ImagePath + “Mia.jpg”>>
<<set _imag2 = setup.ImagePath + “Jordan.jpg”>>
<<character ‘Mia’ ‘Mia.jpg’ _imag>>
<<character ‘Jordan’ ‘Jordan.jpg’ _imag2>>
Music file code that works completely fine:
<<set _bgm = setup.SoundPath + “ok (1).mp3”>>
<<cacheaudio “theme_bgm” _bgm>>
Files:
(The twine file is named the same)
This is what it looks like ingame:
Can someone PLEASE help me I’ve been struggling with this for a while now.