Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

Sugarcube 2.x, making a variable to not get saved in each state, in between passage transitions

$
0
0
Hi all,

I would like to define variables such that they won't be get saved each time in States object, like a constant, because I have lots of javascript object that they dont change throughout my twine project but they are defined with $ prefix. My twine project started to have lags because of huge collection of objects that's (I suppose- ) cloned each time when I proceed to a new passage.

But they must be accessible globally, within the twine system like how I normally access a variable;
// in some mysterious passage

<<for each _item in constant_object_collection_somehow_global>>

<<print _item[_i].name>>

Viewing all articles
Browse latest Browse all 1844

Trending Articles