How to execute an object's description script from code.

if I put "msg(look.object)" it just messages the scripts code without executing it.


If it's a text description, you would do:

msg (object.look)

If it's a script, you would do:

do (object, "look")

If you're not sure which it is because your script can be used on different objects, you would do what the "look at" command itself does:

if (HasString (object, "look")) {
  msg (object.look)
}
else if (HasScript (object, "look")) {
  do (object, "look")
}

Log in to post a reply.

Support

Forums