Edit: I figured it out... Silly mistake here, but might be worth pointing out for anyone else :P I mistakenly assumed the images used in the tutorial were placed under an Images folder so Model/Sarah would be located in an images folder. So when I tried doing that in my own tease it couldn't find that image. So I adjusted my imageFolder to Images/Nature/Forest and now it works fine.
I just started creating my own tease using GuideMe and your scripting engine which so far looks pretty nice. Except for some reason I have created the most basic script and want to set the imgFolder to something else, but no matter what I change it to in the debug "Main" it says the image is Models/Sarah/no-o1.jpg. Even though my scripts look as follows:
Code: Select all
<?xml version="1.0" encoding="utf-8" ?>
<Tease scriptVersion="v0.1">
<Title>Tease using the GuideMe Script Engine</Title>
<Url></Url>
<Author>
<Name>DerpZerp</Name>
<Url>http://www.milovana.com/forum/memberlist.php?mode=viewprofile&u=24738</Url>
</Author>
<MediaDirectory>Temples</MediaDirectory>
<Settings>
<AutoSetPageWhenSeen>False</AutoSetPageWhenSeen>
<PageSound>false</PageSound>
<ForceStartPage>true</ForceStartPage>
</Settings>
<Include file="Common/ScriptEngine.js" />
<Pages>
<Page id="start">
<javascript>
<![CDATA[
function pageLoad() {
// Load the script file
<!-- **EDIT Change the line below to load your script file. -->
loadScript("Scripts/Test.scr");
}
]]>
</javascript>
<Text>
Something went wrong. Check the GuideMe jscript.log
</Text>
<Image id="SetInCode" />
<Delay target="runScript" seconds="0" />
</Page>
<Include file="Common/ScriptEngine.xml">
</Pages>
</Tease>
And the small test script
Code: Select all
imgFolder Nature/Forest
First:
forest.jpg { "hi" }
In the javascript console it says its loading "ShowScriptPage: Got image=Nature/Forest/forest.jpg, text=" "hi" ", delay=0, metronome=0", so I assume it should be my forest.jpg image but no image shows up...
The entire log:
Code: Select all
ShowScriptPage: Got image=Nature/Forest/forest.jpg, text=" "hi" ", delay=0, metronome=0
ShowScriptPage: page.buttons.length=0
ShowScriptPage: page.globalButtons.length=0
replaceTags: After phase 3 text=" "hi" "
replaceTags: After phase 2 text=" "hi" "
handleTextFormats: Result = [ "hi" ]
handleTextFormats: Checking style ["hi"]
getNextPage: Start of text block found.
getNextPage: command="forest.jpg { "hi" }"
processCommands: 2) index=15, command='forest.jpg { "hi" }'
processCommands: Skipping label First:
processCommands: 2) index=14, command='First:'
processCommands: 2) index=13, command='imgFolder Nature/Forest'
processCommands: Skipping label StartScript:
processCommands: 1) index=12, command=StartScript:'
processCommands: Starting...
getNextPage: Starting...
ShowScriptPage: starting...
loadScript: Exiting. Script start index=12
loadScript: Script load complete. Found 16 commands
loadScript: End of text block.
loadScript: Starting text block.
loadScript: line[7]='forest.jpg { "hi" }'
loadScript: Adding label 'first' with target index 14
loadScript: line[6]='First:'
loadScript: line[5]=''
loadScript: line[4]='imgFolder Nature/Forest'
loadScript: line[3]='// Here I set where to find my images. This folder (and it's subfolders) will be used for all images in the script'
loadScript: line[2]=''
loadScript: line[1]='// The guideme script always starts at the beginning of the script file'
loadScript: line[0]='// Any line that begins with a double slash, like this one, is a comment'
loadScript: lines read=8
loadScript: filetext.length=323
loadScript: Loading Scripts/Test.scr
ShowScriptPage: Got image=Nature/Forest/forest.jpg, text=" "hi" ", delay=0, metronome=0
ShowScriptPage: page.buttons.length=0
ShowScriptPage: page.globalButtons.length=0
replaceTags: After phase 3 text=" "hi" "
replaceTags: After phase 2 text=" "hi" "
handleTextFormats: Result = [ "hi" ]
handleTextFormats: Checking style ["hi"]
getNextPage: Start of text block found.
getNextPage: command="forest.jpg { "hi" }"
processCommands: 2) index=15, command='forest.jpg { "hi" }'
processCommands: Skipping label First:
processCommands: 2) index=14, command='First:'
processCommands: 2) index=13, command='imgFolder Nature/Forest'
processCommands: Skipping label StartScript:
processCommands: 1) index=12, command=StartScript:'
processCommands: Starting...
getNextPage: Starting...
ShowScriptPage: starting...
loadScript: Exiting. Script start index=12
loadScript: Script load complete. Found 16 commands
loadScript: End of text block.
loadScript: Starting text block.
loadScript: line[7]='forest.jpg { "hi" }'
loadScript: Adding label 'first' with target index 14
loadScript: line[6]='First:'
loadScript: line[5]=''
loadScript: line[4]='imgFolder Nature/Forest'
loadScript: line[3]='// Here I set where to find my images. This folder (and it's subfolders) will be used for all images in the script'
loadScript: line[2]=''
loadScript: line[1]='// The guideme script always starts at the beginning of the script file'
loadScript: line[0]='// Any line that begins with a double slash, like this one, is a comment'
loadScript: lines read=8
loadScript: filetext.length=323
loadScript: Loading Scripts/Test.scr
Creator of Maze of Desire (GuideMe tease).