Just add an "if" script + "boolean_or_string_or_integer" script (or "call upon" a "checking" function) to your action script (Verb, Command, Function, etc), here's an example of mine though with my combat function (using a "checking" function):
for an example, maybe you can see the enemy on the other side of the river, but neither of you can swim, nor do either of you have projectile weapons, and thus you can't fight each other, yet.
// this is just a single part of my "checking" script block function for whether you can fight it or not:
else if (not npc_reachable (enemy)) {
msg ("There is no " + enemy.alias + " in your vicinity.")
}
// parameters' transfering: enemy -> object_x
<function name="npc_reachable" parameters="object_x" type="boolean">
value = false
foreach (item_x,ScopeReachableNotHeld ()) {
if (item_x=object_x) {
value = true
}
}
return (value)
</function>
you can add in more script lines into the "npc_reachable" function if you have more conditions~factors involved to "check for", such as seen in the below with the "if + boolean" scripting.
----------------------------
if + boolean scripting:
let's say there's a key high up in the air (or on a ledge high off the ground ~ whatever)
<object name="key">
<inherit name="editor_object" />
<take_x type="script">
if (player.flying=true) {
key.parent=player
msg ("you fly up to the key and take it")
} else {
msg ("what!, did you think you could just fly up into the air, to get the key?!")
}
</take_x>
</object>
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
<flying type="boolean">false</flying>
</object>
<object name="flying_potion">
<inherit name="editor_object" />
<alias>mysterious potion</alias>
<drink_x type="script">
player.flying=true
msg ("you drink the mysterious potion, and now you can fly!")
</drink_x>
</object>
---------------------------------
ScopeVisible is what you can see, ScopeReachable is what you can interact with (act upon),
***IGNORE THIS***
so you'll have to add in your own scripting to create the effect of something (an Object or Exit) being (initially) "unreachable" (or an actual "ScopeUnreachable" function).
***IGNORE THIS***
--------------------------------
HK Edit:
err... I should have kept reading... lol:
ScopeVisibleNotReachable ()
http://quest5.net/wiki/ScopeVisibleNotReachableReturns an objectlist containing all the objects which the player can see but cannot reach.
All objects in this scope can be seen, but can't be interacted with as they are either "far away" or inside a transparent container.
ScopeVisibleNotReachableForRoom (room)
http://quest5.net/wiki/ScopeVisibleNotReachableForRoom Returns an objectlist containing all the objects in the specified room which the player can see but cannot reach.
All objects in this scope can be seen, but can't be interacted with as they are either "far away" or inside a transparent container.