define room <Cabin>
north {
'script
}
...
end definedefine room <Cabin>
...
define object <Cabin_North>
...
end define
end definedefine room <Cabin>
north <OutsideCabin>
...
end definedefine game <SomeGame>
command <north; n> {
doaction <#quest.currentroom#; north>
}
end definedefine type <defaultroom>
action <north> {
do <travel($thisobject$; north)>
}
...
end definedefine procedure <travel>
set string <p1; $parameter(1)$>
set string <p2; $parameter(2)$>
set numeric <nFoundExitObject; 0>
set string <exit; #p1#_#p2#>
if real <#exit#> then {
if here <#exit#> then {
if not property <#exit#; hidden> then {
doaction <#exit#; BeforeUse>
inc <nFoundExitObject>
}
}
}
if (%nFoundExitObject% = 0) then {
if property <#p1#; #p2#> then {
goto <$objectproperty(#p1#; #p2#)$>
}
else {
msg <You cannot go that way.>
}
}
end define
since the IF statement will never be true if it's an exit object..
I think the exits should have "define exit <>" instead of object personally.
COMMAND (quest commands have their own priority structure)
Object
Action (these would include "north {..script..}" )
Property (these would include "north <room>" - not "north msg <value>" )
I still see a problem that exit objects are not handled in a "default" way (again - I haven't read the docs, sorry) yet..
IE, no pre-defined actions/properties/whatnot.
.. Then again maybe it's not needed? (since you'd be highly customizing the movement structure to take advantage of these objects in the first place?)
if there's a "locked" - I'm guessing "unlocked" is basically a "not locked" alternative?
The last if statement (if (nobjectexitsfound) ) - I tried to point it out with the name of the variable being compared.