How do I link script files together?

From OHRRPGCE-Wiki
Jump to: navigation, search

Why, with the include command, of course!

include, another.hss

In some cases, to make working on a game with multiple people easier, or if you want to use pre-made scripts like the Third Party HSI, or for organizational purposes, you will want to use separate script files and join them together.

Also, any filename with any extension can be included. People tend to use the extensions .hss for script files, but sometimes .txt is also used.

Example[edit]

Let's say you have a script file, first.hss:

plotscript, script one, begin
  #whatever
end

include, second.hss

Note the include at the bottom. Here is second.hss:

plotscript, script two, begin
  #whatever
end

Now, when you run first.hss through HSPEAK, it will turn it into this:

plotscript, script one, begin
  #whatever
end

plotscript, script two, begin
  #whatever
end

You might find it very helpful to declare all your global variables in one place so that you can see which ID numbers are already taken.

See Also[edit]