What's Part 5 all about?
In Part 5 we'll show you how to include the bot in one of your own worlds - it's not hard and there are only a few things you need to do as the javascripts should do most of the work for you.
Step 1: Attach main script to world
Copy all the files that you uploaded in
Step 4 into the same folder as your new world (apart from base.aer which is our original bot world file).
Now open your world in the builder and add type in
base.js in the JavaScript URL section of World Settings.
Step 2: Attach bot script
Add an anchor point somewhere in your world and name it
anc1. Now with the Object Inspector, type the name
bot.js in the JavaScript URL section. This is the script that loads the bot, and sets up its animation.
Step 3: Set up bot positions
Add four anchor points to your world in the places you want your bot to move to - call them
pos1, pos2, pos3 and
pos4 (you can actually have as many of these as you want by altering the bot script - we'll show you how to do that later).
Step 4: Alter the HTML page
Save your world and then load the page
botmain.htm into a text editor e.g. Notepad. Change the line that starts:
vmp = new MTSPlugin("base.aer",
by replacing the text
base.aer with the name of your world. Now save the file.
Step 5: Test it out
If you now double click on the file
index.htm in your world's folder on your hard drive you shold see your world loading with the bot inside it.
You should be able to move him around with the buttons on the right hand frames page just as you did in our world.
NB the bot won't be able to reply your questions until you upload the file to your web host. We suggest you experiment with the positions first to get them right before uploading.
Step 6: Upload to your web site
Once you have got the bot positioning right all you need to do is upload all the files (including ours) from your world folder to your web site and hopefully all will work from there!