Custom JavaScript function

What is the best way to add a custom function, that can be used from different sections? I tried adding functions, but they don't seem to be available outside of the section.
I can edit the story.sj manually, but it seems wrong and will turn the debugging into torture.


I have found some kind of a solution.
Using the window object seems to work just fine.

I tend to forget about Javascripts rule that everything is mutable.

Is there a better way?


I think we were talking about this on an earlier thread (how to place your functions so they are available for all sections. Tell me if this helps:

http://textadventures.co.uk/forum/squiffy/topic/i4he-f9440sklcuuoazsdg/the-art-of-squiffy-coding


This topic is now closed. Topics are closed after 180 days of inactivity.

Support

Forums