Menu

Show posts

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 Menu

Messages - spook1

#221
Thanks for the help. It owrks great!

martijn
#222
The handle inv. is ticked off.
I have solved all the problems now.
I have a GUI that displays all inventories all the time, whenan inv. item is slected it is temporarily removed from the inv.window, when another inv is slected, the former one is put back!

Thanks for the hints
#223
Completed Game Announcements / Physics game
Thu 12/06/2003 14:51:30
NEW: translated version, intuitive GUI, elaborate GUI intro is skipped

The background are not translated yet, for the electronic puzzles the voltage mentioned in the yellow text must be applied between the red and the blue wire.


Please find below the pilot version of the physics game for high school children.
It is an attempt to motivate kids to learn Ohm's law in a game based environment.

The game can be downloaded from: http://www.xs4all.nl/~koops/ags/index.htm

Please let me knowhow you liked it. Comments and suggestions are welcome.
(NOTE: You can skip the intro!!)
#224
I try to handle inv.window in a global script. Unchecked the "handle inventory items..." in the AGS main menu.
Now when I pick an inventory item from the inv. window, it is not removed from there.
How can I turn it off??

I hope someone can help.

Kind regards,

Martijn
#225
The mode 4 is set once an inventory is active, so this is not the problem.
I have interacte cursor, but somehow I cannot click on the inventory item...
#226
To make a more intuitive GUI I am experimenting with the inventory window.

I have managed to create n inventory window which is always visible and one can scoll through the items in the window.
I cannot pick any inventory items from the screen though.

Can anyone help?

My code is put below

// main global script file
int get_gui;
int got_inv;
string location_name;

function game_start() {
   
game.items_per_line = 17;
game.num_inv_displayed = 17;
SetInvDimensions(16,13);  
 
}

function repeatedly_execute() {
 // put anything you want to happen every game cycle here
GetLocationName(mouse.x,mouse.y,location_name);
get_gui = GetGUIAt(mouse.x,mouse.y);
got_inv = character[EGO].activeinv;



if (get_gui != -1) { // if in  GUI


 if (got_inv != -1) { // if cursor for invmode
    SetCursorMode(4);
    }
    else {
    SetCursorMode(MODE_USE);
    SetMouseCursor(2);
    }  
}
else if ((GetLocationType(mouse.x,mouse.y) > 0) && (got_inv == -1)) { // if not in GUI nor have object as cursor
   SetMouseCursor(2);
}
else if (got_inv != -1) {
     SetCursorMode(4);
}
else { // nothing, so "Walk"
         SetMouseCursor(0);
          }
}




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)   InventoryScreen();  // 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
}

function on_mouse_click(int 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 (GetLocationType(mouse.x,mouse.y) == 0) { // if in "nothing"
   
   if (button== RIGHT) {            


        SetActiveInventory(-1);
     
     }
   if (button == LEFT) {
 
   
            ProcessClick(mouse.x,mouse.y,MODE_WALK);
            SetCursorMode(MODE_WALK);
      }
   }
   else {
       
   if (button==RIGHT) {
 
         
     if ((GetLocationType(mouse.x,mouse.y) > 0) && (got_inv != -1)) { // se nao estiver no GUI e tiver cursor como objecto
           SetActiveInventory(-1);
     }
     else {
        ProcessClick(mouse.x, mouse.y,MODE_LOOK);
        SetCursorMode(MODE_LOOK);
        SetMouseCursor(1);
       
     }
   
   }
   else {  
   
     if (GetCursorMode() != 4) {
 
        ProcessClick(mouse.x, mouse.y,MODE_USE);
        SetCursorMode(MODE_USE);
     }
     else {  

        ProcessClick(mouse.x,mouse.y,4);
     }
    }
  }
}

function interface_click(int interface, int button) {
 if (interface == 1) {
       
   if (button == 4) {   // save game
     SaveGameDialog();
   }  
   else if (button == 5){   // load game
     RestoreGameDialog();
   }  
   else if (button == 3){   // quit
     QuitGame(1);
   }  
   else if (button == 7){    // about
     Display("Adventure Game Studio v2 run-time engine[[Copyright (c) 1999-2002 Chris Jones");
   }
 if ((button == 1 ) && (game.top_inv_item > 0)) { // left
   game.top_inv_item = game.top_inv_item - 1;
   }
   else if (button == 1) {
     Display("There are no more items to the left.");
   }
   if ((button == 2 ) && (game.num_inv_items > game.top_inv_item + 17)) { // right
     game.top_inv_item = game.top_inv_item + 1;
   }  
   else if (button == 2) {
     Display("There are no more items to the right.");    
   }
 }
}
#227
Advanced Technical Forum / update translations
Thu 15/05/2003 21:48:40

Since I am working on a project with help from other memebers of the AGS community, I would like to trnalate my game to show them the status of the project. Therefore I have to translate the game every once and a while. Do you have suggestions for an easy to use translation-process?

After updating my game I have to update the translations.
This is a terrible job. I tried to merge files and came up with a result, but now at many places in the game the translation is not actuated.
This is because of errors in the translation-source file, but how to find these ????
Icannot find a logic that helps me locate the errors after looking for about an hour.

Am I doing something stupid?

Kind regards,

Martijn
#228
CJ,

I am very sorry to have bothered you with my stupidity.
After double checking I found that a problem with copying files generated this problem.
The editor.dat file was lost somehow and the wrong version was restored.
It just happened in the same quarter of an hour I upgraded my AGS editor.
Do not worry.
Its works perfect, when I do so also, there won't be any problem with it for me.

Kind regards,

martijn
#229
I get the error "attempt to edit non-exist function" when I try to open a runscript command for interaction with a character.
It did work before, and all I did in between is set up the latest AGS 2.54 issue.

The former version does not work anymore: "invalid editor data file" also for the older backups.

Any sugestions on how to restore my functions??

Kind regards,

Martijn
#230
Please.e what your scrappy way is.

mabe we should post this question in the technical forum ?

greetings

Martijn
#231
Two simple questions:


1st:

Is there a way to prevent all interactions from happening?
I want the player to enter a room that is totally dark. The player must not be able to do anything (walk, look, interact with hotspots etc.) until he is using a candle and light is there to see.
Howe can I turn off all (inter) actions except for the "Use Inventory" action?


2nd:
How can I get the room to change (in this case, turn on the light using flashlight plugin) by using an inventory (flashlight).
I cannot define to use the inventory on something, I need to use it "on the world". The repeatedly exccute seems to work but is there a simpler solution?

Any simple suggestions?

Kind regards

Martijn
SMF spam blocked by CleanTalk