yep, your "view" simply needs to be changed to:
game.view, game.pov.view, or object.view
(technically, these are all object.view 's lol)
I make this mistake all the time myself, due to forgetting to add the needed permanent location (so it's not a local variable) to it, lol.
-------------
I'm trying to figure out how to use dictionaries myself, I got a question about them in the Noob HK Help Me thread, that no one has answered yet, though I think I figured out how to use them on my own (hopefully), but I haven't tested using them (well my methods~attempts of using them, lol) yet on my own.
I don't think you should need the IntString converter function...
my understanding is that the
DictionaryItem, StringDictionaryItem, ObjectDictionaryItem, and ScriptDictionaryItem, RETURNS the value (strings, objects, or scripts) for you, upon choosing (such as via randomly) its keys (1,2,3,etc or one,two,three,etc or red,blue,yellow,etc or whatever strings).
It took me along time to figure out how to add a ScriptDictionary item, lol.
I'm like how do I write a script into its code ???
code (I think) = dictionary add (dictionary,key,value)
then I finally realized, to make a script code, and thus I could just plug in its name to the value:
<move type="script">
yada yada yada
</move>
dictionary add (travel_object_structure.travel_dictionary,home,move)
---------
here's the questions I was asking on the other thread:
I was asking if people could look over this code of mine, and see if it would work or not, and etc.
(I think I've since figured out how to properly use dictionaries, lists, and etc, but I still haven't gotten around to testing it yet)
(this was written prior to me figuring out how to hopefully do the stuff correctly, lol. this was before I realized to make a script code, so I could add it into the add dictionary code via its name)
<library>
<!-- Commands -->
<command name="help_command">
<pattern>help</pattern>
<script>
help_function
</script>
</command>
<command name="statistics_command">
<pattern>stats</pattern>
<script>
statistics_function
</script>
</command>
<command name="explore_command">
<pattern>explore</pattern>
<script>
explore_function
</script>
</command>
<command name="travel_command">
<pattern>goto</pattern>
<script>
travel_function
</script>
</command>
<command name="storage_command">
<pattern>storage</pattern>
<script>
storage_function
</script>
</command>
<command name="equipment_command">
<pattern>gear</pattern>
<script>
equipment_function
</script>
</command>
<!-- Functions -->
<function name="help_function">
</function>
<function name="statistics_function">
</function>
<function name="explore_function">
switch (game.pov.parent) {
case ("homeland") {
if (firsttime) {
ScriptDictionaryItem (dictionary_structures.homeland_events_script_dictionary,"homeland_discovery")
} otherwise {
ScriptDictionaryItem (dictionary_structures.homeland_events_script_dictionary,GetRandomInt(1,max_value))
}
}
}
</function>
<function name="travel_function">
show menu ("Where do you wish to travel?",dictionary_structures.travel_script_dictionary,true) {
ScriptDictionaryItem (dictionary_structures.travel_script_dictionary,result)
}
</function>
<function name="storage_function">
</function>
<function name="equipment_function">
</function>
<function name="travel_script_dictionary_function"><![CDATA[
if (boolean_structures.homeland_discovered = true) {
dictionary add (dictionary_structures.travel_script_dictionary,"homeland", etc etc and script (if (game.pov.parent <> homeland) then script (game.pov.parent = homeland))
}
]]></function>
<function name="game_turns_function">
game.turns = game.turns + 1
</function>
<!-- Turnscripts -->
<turnscript name="game_turns_turnscript">
travel_script_dictionary_function
game_turns_function
</turnscript>
<!-- Object Structures (Data Storage) -->
<object name="dictionary_structures">
<parent>null</parent>
<travel_script_dictionary type="scriptdictionary">
<item key="homeland"><![CDATA[
if (game.pov.parent = homeland) {
msg ("You are already here at the homeland! Try again.")
wait {
travel_function
}
} else if (game.pov.parent <> homeland) {
game.pov.parent = homeland
]]></item>
</travel_script_dictionary>
<homeland_events_script_dictionary type="scriptdictionary">
<item key="homeland_discovery">
boolean_structures.homeland_discovered = true
msg ("You've discovered the homeland! Now, you can truly explore, and also travel to, the homeland!")
</item>
</homeland_events_script_dictionary>
</object>
</library>