Q8. I want to construct a scenario with nested locations, similar
to the social work and hospitality exemplars. How do I do this?
A8. This is best shown by example. You may want to boot up PBLi
and work through the following text, creating the examples mentioned.
Let’s assume we are building a street. Our street has buildings,
and when students click one particular building (lets say the museum),
we want them to move into it. When this occurs the location window
should change so they no longer see the buildings on the street,
but rather rooms in the building they have just entered (which the
student can then explore). Here’s how we do it….
1. Step One. Add a new Location Map
Essentially we need two layers or “Location Maps” in the scenario,
a top Location Map showing all the locations in the street, then
a second Location Map showing rooms which will replace the locations
in the first Location Map when we move into it. When a new scenario
is created, PBLi assumes there is just one Location Map. If we want
more than one (as we do in this example), we must do the following….
Go to the properties panel under the “Scenario” Tab. At the bottom
of the tab window there is a drop-down box called “Initial Location
Map”. If the scenario is new it will have one map present called
“General Locations” which is the default. To add a second layer,
click the “+” button and type in a name (say “Inside Museum”) then
press Enter. Clicking the drop-down box arrow should now reveal
two Location Maps, “General Locations” and “Inside Museum”.
We can add as many of these location maps as we like, each one
representing a new layer. For now, we will stop with two.
Step Two. Populate our default “General Locations” map.
Under the Scenario Tab, make sure the Initial Location Map is set
to “General Locations” (the default). Now create a number of locations
and call one “Museum”.
Step Three. Open a portal between Location Maps
We now want to populate our museum with rooms that a student can
wander into. In Builder Mode, click on our museum building. In the
Properties Panel, under the Locations Tab, tick the “Use as location
map portal” box. Then make sure the box immediately underneath shows
“Inside Museum” (the name of our second Location Map). Altering
this property changes the museum from a conventional room to a type
of doorway. If the museum building is now clicked on, it takes the
author to the new Location Map “Inside Museum”. In essence, the
museum building becomes a portal from the street to the rooms.
Try it! Clicking on the museum should cause all other locations
(and the museum itself) to disappear! We are now essentially inside
the museum and can now populate it with rooms.
Step 3. Make an exit.
One thing we need to do is to create an exit location, or we’ll
be stuck in the museum forever. To do this in our example, we need
to create a room called “Exit”. Like before, we need to alter the
Location Properties of this room to make a portal, but this time
we want to go back to the “General Locations” map (and hence back
to the street) when we click on it. Make this change under the Location
tab after selecting the Exit room, then try it.
If everything is working as it should, we should be able to go
in and out of the museum.