Schon gelöst....
Hab die neue gui ex und importiert,
die alten befehle gegen die neuen eingetauscht
Ein alter Befehl aber lautet:
Code: Alles auswählen
#sectionstart btnInvUp_Click // DO NOT EDIT OR REMOVE THIS LINE
function btnInvUp_Click(GUIControl *control, MouseButton button) {
InvCustomInv.ScrollUp();
}
#sectionend btnInvUp_Click // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart btnInvDown_Click // DO NOT EDIT OR REMOVE THIS LINE
function btnInvDown_Click(GUIControl *control, MouseButton button) {
InvCustomInv.ScrollDown();
}
Bekomme jetzt den Fehler: Undefined token InvCustomInv
Was soll ich tun?????
Was soll ich tun?????
Was soll ich tun?????
Was soll ich tun?????
Was soll ich tun?????
HIer der gesamte CODE
Code: Alles auswählen
// main global script file
#sectionstart game_start // DO NOT EDIT OR REMOVE THIS LINE
function game_start() {
PlayVideo("intro.wmv",1,1); // called when the game starts, before the first room is loaded
}
#sectionend game_start // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart repeatedly_execute // DO NOT EDIT OR REMOVE THIS LINE
function repeatedly_execute() {
// put anything you want to happen every game cycle here
}
#sectionend repeatedly_execute // DO NOT EDIT OR REMOVE THIS LINE
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
gGui3.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);
}
#sectionstart on_key_press // DO NOT EDIT OR REMOVE THIS LINE
function on_key_press(int keycode) {
// called when a key is pressed. keycode holds the key's ASCII code
if (IsGamePaused() == 1) keycode=0; // game paused, so don't react to keypresses
if (keycode==17) QuitGame(1); // Ctrl-Q
if (keycode==363) SaveGameDialog(); // F5
if (keycode==365) RestoreGameDialog(); // F7
if (keycode==367) RestartGame(); // F9
if (keycode==434) SaveScreenShot("scrnshot.bmp"); // F12
if (keycode==9) show_inventory_window(); // Tab, show inventory
if (keycode==19) Debug(0,0); // Ctrl-S, give all inventory
if (keycode==22) Debug(1,0); // Ctrl-V, version
if (keycode==1) Debug(2,0); // Ctrl-A, show walkable areas
if (keycode==24) Debug(3,0); // Ctrl-X, teleport to room
}
#sectionend on_key_press // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart on_mouse_click // DO NOT EDIT OR REMOVE THIS LINE
function on_mouse_click(MouseButton button) {
// called when a mouse button is clicked. button is either LEFT or RIGHT
if (IsGamePaused() == 1) {
// Game is paused, so do nothing (ie. don't allow mouse click)
}
else if (button == eMouseLeft) {
ProcessClick(mouse.x, mouse.y, mouse.Mode );
}
else { // right-click, so cycle cursor
mouse.SelectNextMode();
}
}
#sectionend on_mouse_click // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart interface_click // DO NOT EDIT OR REMOVE THIS LINE
function interface_click(int interface, int button) {
////////////////////////////////////////////////
// Inventory-GUI //
////////////////////////////////////////////////
if (interface == 3) {
if (button == 0) {
gGui3.Visible = false;
Mouse.UseDefaultGraphic();
}
if (button == 1) {
gGui3.Visible = false;
Mouse.UseDefaultGraphic();
}
if (button == 2) {
gGui3.Visible = false;
Mouse.UseDefaultGraphic();
}
}
}
#sectionend interface_click // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart btnInvUp_Click // DO NOT EDIT OR REMOVE THIS LINE
function btnInvUp_Click(GUIControl *control, MouseButton button) {
InvCustomInv.ScrollUp();
}
#sectionend btnInvUp_Click // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart btnInvDown_Click // DO NOT EDIT OR REMOVE THIS LINE
function btnInvDown_Click(GUIControl *control, MouseButton button) {
InvCustomInv.ScrollDown();
}
#sectionend btnInvDown_Click // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart btnInvOK_Click // DO NOT EDIT OR REMOVE THIS LINE
function btnInvOK_Click(GUIControl *control, MouseButton button) {
// They pressed the OK button, close the GUI
gGui3.Visible = false;
mouse.UseDefaultGraphic();
}
#sectionend btnInvOK_Click // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart btnInvSelect_Click // DO NOT EDIT OR REMOVE THIS LINE
function btnInvSelect_Click(GUIControl *control, MouseButton button) {
// They pressed SELECT, so switch to the Get cursor
mouse.Mode = eModeInteract;
// But, override the appearance to look like the arrow
mouse.UseModeGraphic(eModePointer);
}
#sectionend btnInvSelect_Click // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart btnIconInv_Click // DO NOT EDIT OR REMOVE THIS LINE
function btnIconInv_Click(GUIControl *control, MouseButton button) {
show_inventory_window();
}
#sectionend btnIconInv_Click // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart btnIconCurInv_Click // DO NOT EDIT OR REMOVE THIS LINE
function btnIconCurInv_Click(GUIControl *control, MouseButton button) {
if (player.ActiveInventory != null)
mouse.Mode = eModeUseinv;
}
#sectionend btnIconCurInv_Click // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart btnIconSave_Click // DO NOT EDIT OR REMOVE THIS LINE
function btnIconSave_Click(GUIControl *control, MouseButton button) {
SaveGameDialog();
}
#sectionend btnIconSave_Click // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart btnIconLoad_Click // DO NOT EDIT OR REMOVE THIS LINE
function btnIconLoad_Click(GUIControl *control, MouseButton button) {
RestoreGameDialog();
}
#sectionend btnIconLoad_Click // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart btnIconExit_Click // DO NOT EDIT OR REMOVE THIS LINE
function btnIconExit_Click(GUIControl *control, MouseButton button) {
QuitGame(1);
}
#sectionend btnIconExit_Click // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart btnIconAbout_Click // DO NOT EDIT OR REMOVE THIS LINE
function btnIconAbout_Click(GUIControl *control, MouseButton button) {
Display("Adventure Game Studio v2 run-time engine[[Copyright (c) 1999-2005 Chris Jones");
}
#sectionend btnIconAbout_Click // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart character1_a // DO NOT EDIT OR REMOVE THIS LINE
function character1_a() {
// script for Character 1 (ROGER2): Talk to character
character[EGO].WalkStraight(250,240);
while (character[EGO].Moving) Wait(1);
cEgo.FaceCharacter(cTalk);
cTalk.FaceCharacter(cEgo);
RunDialog(0);
}
#sectionend character1_a // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart character1_b // DO NOT EDIT OR REMOVE THIS LINE
function character1_b() {
// script for Character 1 (ROGER2): Use inventory on character
}
#sectionend character1_b // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart character1_c // DO NOT EDIT OR REMOVE THIS LINE
function character1_c() {
// script for Character 1 (ROGER2): Look at character
character[EGO].WalkStraight(250,240);
while (character[EGO].Moving) Wait(1);
cEgo.FaceCharacter(cTalk);
character[EGO].Say("Das ist Mad Marty");
character[EGO].Say("Er ist meine erste Maat");
}
#sectionend character1_c // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart character1_d // DO NOT EDIT OR REMOVE THIS LINE
function character1_d() {
// script for Character 1 (ROGER2): Interact character
character[EGO].WalkStraight(250,240);
while (character[EGO].Moving) Wait(1);
cEgo.FaceCharacter(cTalk);
character[EGO].Say("Nein!");
character[EGO].Say("Das wäre nicht richtig!");
}
#sectionend character1_d // DO NOT EDIT OR REMOVE THIS LINE
#sectionstart gGui3_Click // DO NOT EDIT OR REMOVE THIS LINE
function gGui3_Click(GUI *theGui, MouseButton button) {
}
#sectionend gGui3_Click // DO NOT EDIT OR REMOVE THIS LINE
Was soll ich tun?????
Was soll ich tun?????
Was soll ich tun?????
Was soll ich tun?????
Was soll ich tun?????