Quote from: Tanker on Fri 25/02/2005 19:24:01Put it in the on_mouse_click
But do i write that in every object`s script or do i put it in the global script?
Example:
#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) { Ã, Ã,Â
Ã, if (GetCursorMode() == MODE_LOOK) {
Ã, Ã, Ã, FaceLocation (EGO, mouse.x, mouse.y); }
Ã, Ã, ProcessClick(mouse.x, mouse.y, GetCursorMode());
Ã, }
Ã, else { Ã, // right-click, so cycle cursor
Ã, Ã, SetNextCursorMode();
Ã, }
}
#sectionend on_mouse_click Ã, // DO NOT EDIT OR REMOVE THIS LINE