Frictional Games Forum (read-only)
How to correctly implement scripts? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: SOMA (https://www.frictionalgames.com/forum/forum-55.html)
+--- Forum: User created content (https://www.frictionalgames.com/forum/forum-79.html)
+---- Forum: Technical Support (https://www.frictionalgames.com/forum/forum-80.html)
+---- Thread: How to correctly implement scripts? (/thread-31503.html)



How to correctly implement scripts? - xerox102 - 11-02-2015

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


RE: How to correctly implement scripts? - Abion47 - 11-02-2015

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.