Using RWX Extensions

Beginning with version 3.0, Outerworlds supports some new extensions to the RWX scripting language which did not exist in previous versions. Because these extensions are new with 3.0, care must be used when using them in objects that are also intended to work either in previous versions of Outerworlds or in other utilities that support RWX files. The problem is that the new commands, if used unqualified, are unrecognzed by these other programs and will thus prevent them from loading the object at all.

To get around this problem, a special extension of the RWX comment character '#' was added in 3.0. Normally, in RWX files the # character starts a comment, and the rest of the line after the # is ignored. However, beginning with Outerworlds 3.0, comments starting with the two characters "#!" will not be ignored. Thus, any 3.0 extension used in RWX files can simply be prefaced with #!, and Active Worlds 3.0 will still process the extension while other programs, including older versions of Outerworlds, will safely ignore it.

For example, say you wish to use the new optional "prelight" argument for the RWX vertex comand. If you specify the command this way:

vertex .1 -.1 -.1 prelight 1 0 0

the object will work fine in Outerworlds 3.0, but it will not load at all in an older version of the Outerworlds browser. However, if you specify the command this way instead:

vertex .1 -.1 -.1 #! prelight 1 0 0

then in 3.0 this line will function exactly the same as it would without the #!, but previous versions of Outerworlds (as well as other RWX programs) will ignore everything after the # character and still be able to load the file. Of course, the object will appear differently in a pre-3.0 browser because it will not be rendered with any prelight colors applied.