An object moves across the screen with eBlock to a location. It then animates with eNoBlock. When I click on the object nothing happens when it should add an inventory item then disappear. I have tried the codes below but they do otherthings to the heartstone. I thought this would be simple!!
//I have put this in the global script.
function repeatedly_execute_always ( )
{
Ã,Â
Ã, if (IsTimerExpired(1)==1)
Ã, Ã, Ã, oHeartstone1.Visible=false;
}
//Room script
if((answer.AsInt == Product)&&(Thrown==1))
{
Ã, object[Thrown].Visible = false;
Ã, GiveScore(5);
Ã, PlaySound(3);
Ã, object[0].Animate(1,6,eOnce,eNoBlock);
//The skeleton (object[0]) burns and the HEARTSTONE1 appears and moves
//across the screen. I want the player to click it before it disappears to place in the inventory.
Ã, oHeartstone1.Visible=true;
Ã, oHeartstone1.SetView(5);
Ã, oHeartstone1.Animate(0, 1, eRepeat, eNoBlock, eForwards);
Ã, oHeartstone1.Move(150, 200, 1, eBlock, eAnywhere);
//The oHeartstone1 stops here and allows the player to click it and an inventory item is added and the oheartstone1 disappears.NOT HAPPENING!! I think the script runs too fast.
Ã, oHeartstone1.Animate(0, 1,eOnce, eNoBlock, eForwards);
Ã, oHeartstone1.Animate(0, 1,eOnce, eNoBlock, eBackwards);
Ã, oHeartstone1.Animate(0, 1,eOnce, eNoBlock, eForwards);
Ã, SetTimer(1, 100);//if the player has not clicked the oHeartstone1 it will disappear when the timer runs out.
Ã, //Maybe the script is running too fast to register the click?
Ã, object[0].Visible=false;
Ã, object[0].SetPosition(337, 269);
Ã, PlaySound(1);
Ã, PlaySound(4);
Ã, object[0].Visible = true;
Ã, object[0].SetView(3);
Ã, object[0].Animate(2,6,eOnce,eBlock);
Ã, object[0].Animate(0,6,eOnce,eNoBlock);
Ã, object[0].Move(280,266,1,eNoBlock,eWalkableAreas);
Ã, }
sectionstart object12_bÃ, // DO NOT EDIT OR REMOVE THIS LINE
function object12_b() {
Ã, // script for Object 12 (HEARTSTONE1): Any click on object
player.AddInventory(iheartstone1);Ã,Â
}
#sectionend object12_bÃ, // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart object12_cÃ, // DO NOT EDIT OR REMOVE THIS LINE
function object12_c() {
Ã, // script for Object 12 (HEARTSTONE1): Any click on object
oHeartstone1.Visible=false;Ã,Â
}
//I have put this in the global script.
function repeatedly_execute_always ( )
{
Ã,Â
Ã, if (IsTimerExpired(1)==1)
Ã, Ã, Ã, oHeartstone1.Visible=false;
}
//Room script
if((answer.AsInt == Product)&&(Thrown==1))
{
Ã, object[Thrown].Visible = false;
Ã, GiveScore(5);
Ã, PlaySound(3);
Ã, object[0].Animate(1,6,eOnce,eNoBlock);
//The skeleton (object[0]) burns and the HEARTSTONE1 appears and moves
//across the screen. I want the player to click it before it disappears to place in the inventory.
Ã, oHeartstone1.Visible=true;
Ã, oHeartstone1.SetView(5);
Ã, oHeartstone1.Animate(0, 1, eRepeat, eNoBlock, eForwards);
Ã, oHeartstone1.Move(150, 200, 1, eBlock, eAnywhere);
//The oHeartstone1 stops here and allows the player to click it and an inventory item is added and the oheartstone1 disappears.NOT HAPPENING!! I think the script runs too fast.
Ã, oHeartstone1.Animate(0, 1,eOnce, eNoBlock, eForwards);
Ã, oHeartstone1.Animate(0, 1,eOnce, eNoBlock, eBackwards);
Ã, oHeartstone1.Animate(0, 1,eOnce, eNoBlock, eForwards);
Ã, SetTimer(1, 100);//if the player has not clicked the oHeartstone1 it will disappear when the timer runs out.
Ã, //Maybe the script is running too fast to register the click?
Ã, object[0].Visible=false;
Ã, object[0].SetPosition(337, 269);
Ã, PlaySound(1);
Ã, PlaySound(4);
Ã, object[0].Visible = true;
Ã, object[0].SetView(3);
Ã, object[0].Animate(2,6,eOnce,eBlock);
Ã, object[0].Animate(0,6,eOnce,eNoBlock);
Ã, object[0].Move(280,266,1,eNoBlock,eWalkableAreas);
Ã, }
sectionstart object12_bÃ, // DO NOT EDIT OR REMOVE THIS LINE
function object12_b() {
Ã, // script for Object 12 (HEARTSTONE1): Any click on object
player.AddInventory(iheartstone1);Ã,Â
}
#sectionend object12_bÃ, // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart object12_cÃ, // DO NOT EDIT OR REMOVE THIS LINE
function object12_c() {
Ã, // script for Object 12 (HEARTSTONE1): Any click on object
oHeartstone1.Visible=false;Ã,Â
}