QuoteGlobalScript.asc(541): Error (line 541): PE04: parse error at ';'For starters if statements do not end with a ; .....this is the error
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuoteGlobalScript.asc(541): Error (line 541): PE04: parse error at ';'For starters if statements do not end with a ; .....this is the error
//After clicking on dynamite object
player.Walk(x,y,eBlock, eWalkableAreas); // Walk to Dynamite x y
odynamite.Visible=false; //Dynamite disappears
player.ChangeView(View number); // Dynamite view
// Player clicks on rock. You will need an 'if' condition that player is in dynamite view for events to happen.
player.Walk(x,y,eBlock, eWalkableAreas); // Walk to position x y in Dynamite View
player.ChangeView(View number); // Back to Normal view
Wait(6); // To give a very slight delay
// Dynamite detonates
//Your script asc
#define MAX_MISSIONS 100
String missions[MAX_MISSIONS];
int mission_count=0;
function AddMission(String mission_text)
{
missions[mission_count]=mission_text;
mission_count++;
return mission_count-1;//return the mission ID
}
function ModifyMission(int missionID, String new_text)
{
missions[missionID]=new_text;
}
function RefreshLabel()
{
LMemory.Text="";
int i=0;
while(i<mission_count)
{
LMemory.Text=String.Format("%s %s [",LMemory.Text,missions[i]); //Maybe AGS has an append method, I can't remember
i++;
}
}
//Your script ash
import function AddMission(String mission_text);
import function ModifyMission(int missionID, String new_text);
import function RefreshLabel();
//At global position
//examples:
int lubricant_mission,food_mission;
//When you want to add 1 mission or more
lubricant_mission=AddMission("Find lubricant.");
food_mission=AddMission("Find food");
RefreshLabel();
//Whenever you want to modify the text for mission completed:
ModifyMission(lubricant_mission,"Have found lubricant");
RefreshLabel();
int nursery_mission, radio_mission, clover_mission, head_mission, barn_mission, spike_mission, wardrobe_mission, pit_mission, train_mission, carpet_mission, ladder_mission, madonna_mission, lubricant_mission, food_mission, word_mission, wheel_mission, battery_mission, glue_mission, elements_mission, switch_mission, questions_mission, block_mission, wooddoor_mission, combust_mission, direction_mission, cup_mission,balloons_mission,candle_mission,word2_mission;
int walktimer;
function Walking()
{
if(player.Moving)
{
walktimer=0;
}
else if (walktimer > GetGameSpeed ())
{
Stopped_Moving += 1;
LNotMoving.Text = String.Format("%d", Stopped_Moving);
walktimer = 0;
}
else walktimer++;
}
LDoors.Text = String.Format("%d", Doors);
Larrows.Text = String.Format("%d", Arrows);
LNotMoving.Text = String.Format("%d",Stopped_Moving);
LSecrets.Text = String.Format("%d",Secret_Area);
LRemain.Text = String.Format("%d",lapsed);
LTime_Taken.Text = String.Format("%d",lapsed);
LLostTime.Text = String.Format("%d",Stopped_Moving);
LMeanTime.Text = String.Format("%d",lapsed-Stopped_Moving);
Walking(); // This is the function I need to stop when viewing the status report... The gui is set to pause game.
if(gStatus.Visible==false)
Walking();
// function top Global asc
function Walking()
{
if(player.Moving)
{
SetTimer(3, 0);
} else
{
Stopped_Moving=(Stopped_Moving +1);
LNotMoving.Text = String.Format("%d", Stopped_Moving);
SetTimer(3, 40);
}
}
// import Global ash
import function Walking();
// Global asc
// in function repeatedly_execute_always()
}
if (IsTimerExpired(3))
{
Walking();
}
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.358 seconds with 15 queries.