Can you force a Master Section to happen at the end of sections instead of the beginning

I'm looking at showing the player a list of his current items. I'm using a master section to display them, but it displays at the top of each section. Is there a way to make it activate at the end of each section instead?


Here's what I do:


[[Room 1]]:
This is a room. [[Room 2]] is a room too.

{Inventory}

[[Room 2]]:
This is Room 2. [[Room 1]] is also a room.

There are some [widget]s here.

[widget]:
@inc widget
@set items=true
You take the widget.

[[Inventory]]:
{if items=true:You are carrying} {if widget>0:{widget} widget{if widget>1:s}}{if items=true:.}

why it does not work anymore if you add other rooms?


The reason why it does not work is that the passage "widget" has the same name of attribute "widget"

[[Room 1]]:
This is a room. [[Room 2]] is a room too.

{Inventory}

[[Room 2]]:
This is Room 2. [[Room 1]] is also a room.

There are some [widget](takeWidget)s here.      <--- here!

{Inventory}

[takeWidget]:     <---- here!
@inc widget
@set items=true
You take the widget.

[[Inventory]]:
{if items=true:You are carrying} {if widget>0:{widget} widget{if widget>1:s}}{if items=true:.}

This is my way to display master section at the end of each section. Just insert one line javascript. :)
( you can change the number 1000 to less number to display it faster.)

[[Room 1]]:
This is a room. [[Room 2]] is a room too.

[[Room 2]]:
This is Room 2. [[Room 1]] is also a room.

There are some [widget](takeWidget)s here.

[takeWidget]:
@inc widget
@set items=true
You take the widget.

[[Inventory]]:
{if items=true:You are carrying} {if widget>0:{widget} widget{if widget>1:s}}{if items=true:.}

[[]]:
     setTimeout(function(){squiffy.ui.write(squiffy.story.sections['Inventory'].text)},1000); 

This.
Is.
GENIUS!


:)


Log in to post a reply.

Support

Forums