
Magic as Programming, Programming as Magic ◾ 189
//at this location
}
}
function Clear () //this function is used to reset the
//trigger when a summoning has failed
{
global.cor_count = global.cor_count - 1; //since only
//one object could be in this trigger, simply decrease the
//cor_count by 1
isfull = false; //reset isfull to false,
//indicating there are no objects in this trigger
once = false; //once is set to false, so the
//Clear function only gets called once
//otherwise, the Clear function would get called multiple
//times and the cor_count would go down by more than 1
}
function Update ()
{
//this if/else statement will reset ...