Jump to content


Photo

Click Map


  • Please log in to reply
No replies to this topic

#1 Toni12

Toni12

    Designer

  • New Member
  • 851 posts
  • Version:GM8

Posted 03 March 2007 - 11:34 PM

I made a small script for what I call a "Click Map".
The script defines a rectangle for where if the mouse clicks the area it
returns true.

//Sets a rectangle map
//Copyright (C)2007 Anthoni Caldwell
/*
Arguments:
0 - x1
1 - y1
2 - x2
3 - y2
*/

if ((mouse_x < argument0)&&(mouse_y < argument1)&&(mouse_x > argument2)&&(mouse_y > argument4)) and mouse_check_button_pressed(mb_left)
{
return true;
}
else
{
return false;
}

Use it for what you will.
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users