Game Development Reference
In-Depth Information
//FUNCTIONS
////////////////////////////////////////////////////////////////////////////////
function GoToObject()
{
Scout.GoTo(300, 600);
Scout.TurnTo(DI_DOWNRIGHT);
}
////////////////////////////////////////////////////////////////////////////////
function SkullTalk1()
{
var Responses;
var Selected;
var Loop = true;
while(Loop)
{
// prepare the choices
Responses[0] = “Talking skull”;
Responses[1] = “Name”;
Responses[2] = “Pole”;
Responses[3] = “Skull Rock”;
Responses[10] = “Exit”;
// fill the response box
if(!SkullVar.Talking) Game.AddResponse(0, Responses[0]);
if((!SkullVar.Name)||((BlinkyVar.Nigel)&&(!SkullVar.Nigel)))
Game.AddResponse(1, Responses[1]);
if(!SkullVar.Pole) Game.AddResponse(2, Responses[2]);
if(!SkullVar.SkullRock) Game.AddResponse(3, Responses[3]);
Game.AddResponse(10, Responses[10]);
// let the player choose one
Selected = Game.GetResponse();
Search WWH ::




Custom Search