Thank you Alex! If I set the variable "b" equal to the Squiffy attribute "b" where "a" is set, it should work out fine.
The work I'm having problem with involves something such as this:
<!-- Room setup -->
[[setup]]:
function Room(desc, north, east, south, west) {
this.desc = desc;
this.north = north;
this.east = east;
this.south = south;
this.west = west;
}
var home = new Room("Your home is unique, a makeshift house built near the edge of the forest and ocean. Your happy to call it home, it took you a week to build it, fence and all!","Dark Woods","Ghost Town","Meadow","Beach");
var town = new Room("...");
<!-- When you eventually get to your home... -->
[[home]]:
squiffy.set("location","home");
squiffy.set("roomDesc",home.desc);
squiffy.set("roomNorth",home.north);
squiffy.set("roomEast",home.east);
squiffy.set("roomSouth",home.south);
squiffy.set("roomWest",home.west);
{roomDesc}<br>
You can go [[north ({roomNorth})]](travel,direction=north), [[west ({roomWest})]](travel,direction=west), [[south ({roomSouth})]](travel,direction=south), [[east ({roomEast})]](travel,direction=east). You are currently at {location}.
[[location]]:
//code to perform a function of where to travel based on current location and direction chosen.
So, in order to fix this, I'll need to assign var home here instead.
<!-- When you eventually get to your home... -->
[[home]]:
var home = {
desc:"Your home is unique, a makeshift house built near the edge of the forest and ocean. Your happy to call it home, it took you a week to build it, fence and all!",
north:"Dark Woods",
east:"Ghost Town",
south:"Meadow",
west:"Beach"
};
squiffy.set("location","home");
squiffy.set("roomDesc",home.desc);
squiffy.set("roomNorth",home.north);
squiffy.set("roomEast",home.east);
squiffy.set("roomSouth",home.south);
squiffy.set("roomWest",home.west);
You are currently at {location}.
{roomDesc}<br>
You can go [[north ({roomNorth})]](travel,direction=north), [[west ({roomWest})]](travel,direction=west), [[south ({roomSouth})]](travel,direction=south), [[east ({roomEast})]](travel,direction=east).
Thanks again Alex! It works perfectly!