How do i add javascript in my games? The documentation is too short and i need a detailed one on how to do it

You need to add four spaces in front of every javascript line. And it needs to go in front of all "squiffy" commands.

So, for example, some of my code:

    squiffy. randomPath ("numPath");
You find an old water fountain. While it smells like
{if p1=1:a rat's been pissing in it,}
{if p1=2:rust and corrosion,}
{if p1=3:something died in the splash bowl,}
{if p1=4:homeless tramps have been washing their teeth in it,}
{if p1=5:stagnant water,}
{if p1=6:pond scum,}
there is still pressure on the pipes.

In this case, the function "Random Path" generates a p1 value between 1 and 6.

Hey thanks man! It worked

thank you

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