Frictional Games Forum (read-only)

Full Version: How to correctly implement scripts?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello there!

Since I have already played around with Amnesias HPL Engine way back (and made a really shitty 2 level custom story), I figured I might just try HPL3 as well and make something, well, less horrible.

I have figured out how to set up a basic map, description etc for the custom story, but I am struggling with implementing scripts. Right now I installed and configured CodeLite and I have a running script.

Now, if my map is called map01, and I want my script to run with map01, how do I do this? I tried simply calling the script map01.hps and putting it in the scripts folder, but that doesn't work.

Apologies if this is a really easy question to answer, but I have had some problems with the documentation and English is not my first language, so I might have missed it.

Regards,
xerox102
When you create a map with the Level Editor, a script file for that map will be automatically generated in the same place as where you saved the map files. For example, if you create a map called my_map.hpm, it will generate a file called my_map.hps.

The scripts for specific maps will always be in the same folder as the map itself. The scripts folder is for any external scripts you wish to run outside of any particular map, such as user modules or utility/helper functions.