Thanks for the that. Ok I tried it and I got the error message variable already defined and it took me to the global script where I had pasted the code. I still dont fully understand the function stuff. I have copied and pasted below the current code sequence of the things i have already in the rep_exe for other functions, before the code you gave me goes in. I have tried but still doesnt recognise.
Code: ags
EDIT:
Hey! can someone please reply?
? I am sorry that I have to double post but I don't want to be waiting this long for a reply! PLEASE HELP! Or I will have to post my question into a new topic SORRY! I think its cos this topic is labelled SOLVED at the end thats why but I am not happy no one has answered my question above come on!
EDIT by Ashen: To remove double post. Have patience, and read the rules.
#sectionstart repeatedly_execute // DO NOT EDIT OR REMOVE THIS LINE
function repeatedly_execute() {
// put anything you want to happen every game cycle here
lblTime.Text = String.Format("%02d:%02d, Day %d", GameTime.Hour(),
GameTime.Minute(), GameTime.Day());
// Start of special Following Code
if (cEgo.Moving == false) { // Player has stopped moving (obviously)
if (Follow == 1) { // If Jonah is still flying
// Change state (the 'Follow' variable), and have him fly to Ego
cJonah.FollowCharacter(null);
Follow = 2;
cJonah.Walk(cEgo.x, cEgo.y, eNoBlock);
}
else if (Follow == 2) { // If Jonah is on his way to Ego's shoulder
if (cEgo.Loop == 1 || cEgo.Loop == 0) cJonah.Baseline = cEgo.y -
1; // Or '==2' for the other shoulder
else cJonah.Baseline = cEgo.y + 1;
if (cJonah.Moving == false) { // Jonah is at Ego's location
// Make sure their Loops are always the same
cJonah.Loop = cEgo.Loop;
}
}
}
else { // If Ego is Moving
if (Follow == 2) { // If Jonah is 'at rest'
// Change state (the 'Follow' variable), and have him start flying free
cJonah.FollowCharacter(cEgo,0,0);
Follow = 1;
}
}
// End of special Following Code
}
function show_inventory_window () {
// This demonstrates both types of inventory window - the first part is how to
// show the built-in inventory window, the second part uses the custom one.
// Un-comment one section or the other below.
// ** DEFAULT INVENTORY WINDOW
// InventoryScreen();
// ** CUSTOM INVENTORY WINDOW
gInventory.Visible = true;
// switch to the Use cursor (to select items with)
mouse.Mode = eModeInteract;
// But, override the appearance to look like the arrow
mouse.UseModeGraphic(eModePointer);
}
#sectionend repeatedly_execute // DO NOT EDIT OR REMOVE THIS LINE
EDIT:
Hey! can someone please reply?

EDIT by Ashen: To remove double post. Have patience, and read the rules.