Ok, some scripts...
Global-Script:
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) {
ProcessClick(mouse.x, mouse.y, GetCursorMode() );
SetCursorMode(MODE_WALK);
}
else if (button==RIGHT) {
if (GetLocationType(mouse.x, mouse.y)==2)
{ SetGlobalInt(80,9);
ProcessClick(mouse.x, mouse.y, MODE_TALK);
SetGlobalInt(80,0); }
else
{ FaceLocation(GetPlayerCharacter(), mouse.x, mouse.y );
ProcessClick(mouse.x, mouse.y, MODE_LOOK);
SetCursorMode(MODE_WALK);
}
}
}
Hotspot-Script: (door)
// script for hotspot5: Any click on hotspot
if (GetGlobalInt(80)==0) NewRoom(1); // walk to
else if (GetGlobalInt(80)==1) Display("That doesn't seem to work."); // close
else if (GetGlobalInt(80)==2) Display("I can't pick that up."); // give
else if (GetGlobalInt(80)==3) Display("It doesn't seem to open."); // open
else if (GetGlobalInt(80)==4) Display("I can't move it."); // push
else if (GetGlobalInt(80)==5) Display("I can't move it."); // pull
else if (GetGlobalInt(80)==6) Display("I can't pick that up."); // pick up
else if (GetGlobalInt(80)==7) Display("That doesn't seem to work.");// use
else if (GetGlobalInt(80)==10) Display("That doesn't seem to work."); // turn on
else if (GetGlobalInt(80)==11) Display("That doesn't seem to work."); // turn off
else Display("There's nothing to read on it."); // look
SetGlobalInt(80,0);
----
The if (GetGlobalInt(80)==0) doesn't seem to work and I don't understand why.
Global-Script:
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) {
ProcessClick(mouse.x, mouse.y, GetCursorMode() );
SetCursorMode(MODE_WALK);
}
else if (button==RIGHT) {
if (GetLocationType(mouse.x, mouse.y)==2)
{ SetGlobalInt(80,9);
ProcessClick(mouse.x, mouse.y, MODE_TALK);
SetGlobalInt(80,0); }
else
{ FaceLocation(GetPlayerCharacter(), mouse.x, mouse.y );
ProcessClick(mouse.x, mouse.y, MODE_LOOK);
SetCursorMode(MODE_WALK);
}
}
}
Hotspot-Script: (door)
// script for hotspot5: Any click on hotspot
if (GetGlobalInt(80)==0) NewRoom(1); // walk to
else if (GetGlobalInt(80)==1) Display("That doesn't seem to work."); // close
else if (GetGlobalInt(80)==2) Display("I can't pick that up."); // give
else if (GetGlobalInt(80)==3) Display("It doesn't seem to open."); // open
else if (GetGlobalInt(80)==4) Display("I can't move it."); // push
else if (GetGlobalInt(80)==5) Display("I can't move it."); // pull
else if (GetGlobalInt(80)==6) Display("I can't pick that up."); // pick up
else if (GetGlobalInt(80)==7) Display("That doesn't seem to work.");// use
else if (GetGlobalInt(80)==10) Display("That doesn't seem to work."); // turn on
else if (GetGlobalInt(80)==11) Display("That doesn't seem to work."); // turn off
else Display("There's nothing to read on it."); // look
SetGlobalInt(80,0);
----
The if (GetGlobalInt(80)==0) doesn't seem to work and I don't understand why.
