Miscellaneous functions

A few of the functions that belong to Ultimate 3D do not fit into the other tutorials. These are listed here.

The following function does exactly the same thing as mouse_check_button, because this Game Maker function does not work with Ultimate 3D.

MouseCheckButton(
MouseButton
)

MouseButton
This parameter can take the Game Maker constants mb_left, mb_right, mb_middle and mb_none.


Since Ultimate 3D can also be used with Game Maker 5.0 which did not have the function mouse_set_screen_position(...), Ultimate 3D offers functions to replace this function.

This function sets global.mouse_x and global.mouse_y to the mouse position in screen space.

GetMousePos()

This function can be used to reset the mouse position in screen space.

SetMousePos(
X, Y
)

X, Y
The new position of the cursor in screen space.


Apart from the functions to work with the mouse there are two functions to take screenshots. They are also very simple.

TakeScreenshot(
BMPFile
)

BMPFile
A string that contains the ending .bmp. This is the file to which the function will save the screen shot.


The second one allows you to define the part of the screen you want to save:

TakeScreenshotEx(
BMPFile,
Unused,
Left, Top, Right, Bottom
)

Unused
Just ignore this. It was used in a previous version and now it's obsolete.

Left, Top, Right, Bottom
These parameters specify the area of the screen that is to be saved to file. The values are given relative to the left top of the first view.



© Christoph Peters. Some rights reserved.

Creative Commons License XHTML 1.0 Transitional