(please note that I read all I could throughout the forums and found no help otherwise....)
I even found a website tutorial:
http://www.digitalmindstudio.ch/script.php?id=4&page=2
now while I did NOT do everything on this page. I thought I was doing enough...
basically, this is my first game, so I don't care about look, use or whatever....I just want to for now open an inventory window (i can do that)....have my pointer arrow be the only cursor available (i can do that) then you click on the item to select it (i CAN'T do that) and then click ok....
if you click ok while the arrow is still up, I default you back to walk...
I saw on these boards that it HAS to be the interact cursor to select an item... I tried that...no go....I click on my inventory and just nothing happens....
here is my global script thus far.....
// main global script file
function Cursors_gamehourglass()
{
DisableCursorMode(0);
DisableCursorMode(1);
DisableCursorMode(2);
DisableCursorMode(6);
EnableCursorMode(7);
SetCursorMode(7);
}
function Cursors_gamearrow()
{
DisableCursorMode(0);
DisableCursorMode(1);
DisableCursorMode(2);
DisableCursorMode(7);
EnableCursorMode(6);
SetCursorMode(6);
}
function Cursors_gamenormal()
{
EnableCursorMode(0);
EnableCursorMode(1);
EnableCursorMode(2);
EnableCursorMode(6);
DisableCursorMode(7);
}
int Direction_to_outsidebank = -1; // 0 = from bank, 1 = from east
#sectionstart game_start // DO NOT EDIT OR REMOVE THIS LINE
function game_start() // called when the game starts, before the first room is loaded
{
SetInvDimensions(20, 20);
}
#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
Cursors_gamearrow();
DisableCursorMode(6);
EnableCursorMode(2);
SetCursorMode(2);
SetMouseCursor(6);
GUIOff(1);
GUIOn (2);
}
#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.pcx"); // 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(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 (button==LEFT)
{
Display("ddd");
ProcessClick(mouse.x,mouse.y,GetCursorMode());
}
else // right-click, so cycle cursor
{
SetNextCursorMode();
}
}
#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)
{
if (interface == 1) // top side gui
{
if (button == 0)
{
//InventoryScreen();
show_inventory_window();
SetCursorMode(2);
}
}
else if (interface == 2)
{
if (button == 1)
{
GUIOff(2);
GUIOn(1);
Cursors_gamenormal();
if (GetCursorMode() != 4) // didn't select an item
SetCursorMode(0);
}
else if (button == 2)
{
SetCursorMode(2);
SetMouseCursor(6);
}
else
{
string buffer;
StrFormat (buffer, "%d", button);
Display(buffer);
}
}
}
#sectionend interface_click // DO NOT EDIT OR REMOVE THIS LINE
export Direction_to_outsidebank;
#sectionstart inventory1_a // DO NOT EDIT OR REMOVE THIS LINE
function inventory1_a() {
// script for inventory1: Use inventory on this item
}
#sectionend inventory1_a // DO NOT EDIT OR REMOVE THIS LINE
if there is any other information you guys need let me know and I'll post it....
I even found a website tutorial:
http://www.digitalmindstudio.ch/script.php?id=4&page=2
now while I did NOT do everything on this page. I thought I was doing enough...
basically, this is my first game, so I don't care about look, use or whatever....I just want to for now open an inventory window (i can do that)....have my pointer arrow be the only cursor available (i can do that) then you click on the item to select it (i CAN'T do that) and then click ok....
if you click ok while the arrow is still up, I default you back to walk...
I saw on these boards that it HAS to be the interact cursor to select an item... I tried that...no go....I click on my inventory and just nothing happens....
here is my global script thus far.....
// main global script file
function Cursors_gamehourglass()
{
DisableCursorMode(0);
DisableCursorMode(1);
DisableCursorMode(2);
DisableCursorMode(6);
EnableCursorMode(7);
SetCursorMode(7);
}
function Cursors_gamearrow()
{
DisableCursorMode(0);
DisableCursorMode(1);
DisableCursorMode(2);
DisableCursorMode(7);
EnableCursorMode(6);
SetCursorMode(6);
}
function Cursors_gamenormal()
{
EnableCursorMode(0);
EnableCursorMode(1);
EnableCursorMode(2);
EnableCursorMode(6);
DisableCursorMode(7);
}
int Direction_to_outsidebank = -1; // 0 = from bank, 1 = from east
#sectionstart game_start // DO NOT EDIT OR REMOVE THIS LINE
function game_start() // called when the game starts, before the first room is loaded
{
SetInvDimensions(20, 20);
}
#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
Cursors_gamearrow();
DisableCursorMode(6);
EnableCursorMode(2);
SetCursorMode(2);
SetMouseCursor(6);
GUIOff(1);
GUIOn (2);
}
#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.pcx"); // 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(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 (button==LEFT)
{
Display("ddd");
ProcessClick(mouse.x,mouse.y,GetCursorMode());
}
else // right-click, so cycle cursor
{
SetNextCursorMode();
}
}
#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)
{
if (interface == 1) // top side gui
{
if (button == 0)
{
//InventoryScreen();
show_inventory_window();
SetCursorMode(2);
}
}
else if (interface == 2)
{
if (button == 1)
{
GUIOff(2);
GUIOn(1);
Cursors_gamenormal();
if (GetCursorMode() != 4) // didn't select an item
SetCursorMode(0);
}
else if (button == 2)
{
SetCursorMode(2);
SetMouseCursor(6);
}
else
{
string buffer;
StrFormat (buffer, "%d", button);
Display(buffer);
}
}
}
#sectionend interface_click // DO NOT EDIT OR REMOVE THIS LINE
export Direction_to_outsidebank;
#sectionstart inventory1_a // DO NOT EDIT OR REMOVE THIS LINE
function inventory1_a() {
// script for inventory1: Use inventory on this item
}
#sectionend inventory1_a // DO NOT EDIT OR REMOVE THIS LINE
if there is any other information you guys need let me know and I'll post it....