How to avoid running a script / displaying JS link on start section

Hi!

I've found a nice solution to implement an inventory system (better than mine ;-) ) in that closed post:

https://textadventures.co.uk/forum/squiffy/topic/ek5beopywuqur_qnhhoigg/going-back-to-previous-sections-back-link-history

The last line says:

sectionLink('inventory', 'inventor');

That line is displaying a link to an "inventory".
But I think it doesn't make sense being displayed an startscreen. "[[]]:"

Anyone a solution to make it:

"if NOT startscreen than display inventory link"

Sorry, I learning JS already... :-D


Found it! :-)

if (history != 'sectionname') {
    sectionLink('inventory', 'inventory');
}

If NOT in sectionname than display - where sectionname is startscreen [[]]:


That's awesome!


nice work man i was also having this problem


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

Support

Forums