Facebook Twitter YouTube Frictional Games | Forum | Newsletter | Dev Blog | Dev Wiki | Support


Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Globals script for Custom Stories?
Author Message
MulleDK19 Offline
Senior Member

Posts: 540
Joined: Jun 2009
Reputation: 10
Post: #1
Globals script for Custom Stories?

Hi.

Where should the globals.hps and inventory.hps scripts be placed in Custom Stories?

[Image: 16455.png]
09-17-2010 11:54 AM
Find all posts by this user Quote this message in a reply
Luis Offline
Frictional Games

Posts: 255
Joined: Jun 2006
Reputation: 6
Post: #2
RE: Globals script for Custom Stories?

Just putting them in the 'maps' subfolder should do Smile Get back here if you came across any problems.

EOF
09-17-2010 01:42 PM
Find all posts by this user Quote this message in a reply
MulleDK19 Offline
Senior Member

Posts: 540
Joined: Jun 2009
Reputation: 10
Post: #3
RE: Globals script for Custom Stories?

(09-17-2010 01:42 PM)Luis Wrote:  Just putting them in the 'maps' subfolder should do Smile Get back here if you came across any problems.

Thanks for the reply. Still doesn't work, though.

Edit: Tried with both global.hps and globals.hps in all my folders in the custom story.

[Image: 16455.png]
09-17-2010 02:18 PM
Find all posts by this user Quote this message in a reply
jens Offline
Frictional Games

Posts: 3,553
Joined: Apr 2006
Reputation: 169
Post: #4
RE: Globals script for Custom Stories?

In 00_map1.hps how do you write the GlobalTest()? I think, if I'm not mixing this up with old Penumbra, you ahev to have a @ infront of it or something like that so @GlobalTest();
09-17-2010 02:22 PM
Visit this user's website Find all posts by this user Quote this message in a reply
MulleDK19 Offline
Senior Member

Posts: 540
Joined: Jun 2009
Reputation: 10
Post: #5
RE: Globals script for Custom Stories?

(09-17-2010 02:22 PM)jens Wrote:  In 00_map1.hps how do you write the GlobalTest()? I think, if I'm not mixing this up with old Penumbra, you ahev to have a @ infront of it or something like that so @GlobalTest();

I was calling it normally. I still get the error. But this gives yet an error:

Quote:---------------------------
FATAL ERROR
---------------------------
FATAL ERROR: Could not load script file 'custom_stories/Tutorials/custom_stories/Tutorials/maps/ch01/00_tutorial1.hps'!
main (13, 3) : ERR : No matching signatures to 'GlobalTest()'
main (13, 2) : ERR : Object handle is not supported for this type

---------------------------
OK
---------------------------

My custom story:
http://www.amnesia.treesoft.dk/downloads...taller.exe

[Image: 16455.png]
09-17-2010 02:26 PM
Find all posts by this user Quote this message in a reply
jens Offline
Frictional Games

Posts: 3,553
Joined: Apr 2006
Reputation: 169
Post: #6
RE: Globals script for Custom Stories?

Looked it up in the old wiki, it was indeed a @ prefix, you know, I have no clue if something was changed or even not supported in Amnesia. As we did not really use the global at all this time around.

Maybe Luis have some insight or else can ask Thomas when he has rebooted his computer back from ATI X Hell.
09-17-2010 02:35 PM
Visit this user's website Find all posts by this user Quote this message in a reply
MulleDK19 Offline
Senior Member

Posts: 540
Joined: Jun 2009
Reputation: 10
Post: #7
RE: Globals script for Custom Stories?

(09-17-2010 02:35 PM)jens Wrote:  Looked it up in the old wiki, it was indeed a @ prefix, you know, I have no clue if something was changed or even not supported in Amnesia. As we did not really use the global at all this time around.

Maybe Luis have some insight or else can ask Thomas when he has rebooted his computer back from ATI X Hell.

Okay. Is there a link to the old Wiki?

[Image: 16455.png]
09-17-2010 03:06 PM
Find all posts by this user Quote this message in a reply
Thomas Offline
Frictional Games

Posts: 2,454
Joined: Apr 2006
Reputation: 42
Post: #8
RE: Globals script for Custom Stories?

In Amnesia, you can NOT call functions in global from local script or use the global script file for any callbacks.

Global script is mainly just for setting GlobalVar and other start conditions.
09-17-2010 03:45 PM
Find all posts by this user Quote this message in a reply
MulleDK19 Offline
Senior Member

Posts: 540
Joined: Jun 2009
Reputation: 10
Post: #9
RE: Globals script for Custom Stories?

(09-17-2010 03:45 PM)Thomas Wrote:  In Amnesia, you can NOT call functions in global from local script or use the global script file for any callbacks.

Global script is mainly just for setting GlobalVar and other start conditions.

Oh well... Can I request an include feature then? Tongue

#include "misc.hps"

[Image: 16455.png]
09-17-2010 03:48 PM
Find all posts by this user Quote this message in a reply
Javist Offline
Junior Member

Posts: 43
Joined: Sep 2010
Reputation: 0
Post: #10
RE: Globals script for Custom Stories?

Including? I for. ^^
Would be a very handy, instead of writing same functions in each map.

Also i'd like to ask something.
Script working in a single-thread model?
Or, timers,callbacks being executed in different thread? Mb something like event queue thread(threadpool)?
If separately, then it would be greaat to have also a Sleep() function.
Eh..)

unzip, strip, touch, finger, grep, mount, fsck, more, yes, fsck, fsck, fsck, umount, sleep.
09-17-2010 06:24 PM
Find all posts by this user Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)