GetClick

by Garthor
Simple proc to easily grab the next object a player clicks [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://Garthor.GetClick##version=3

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:

byond://Garthor.GetClick##version=3

273 downloads
Version 3
Date added: Jul 6 2009
Last updated: May 23 2011
0 fans
GetClick() is a mob proc that greatly simplifies the process of getting input through clicks. It may be called at any time and the proc will wait (similar to input()) until the player clicks a new object. As a practical example of usage:

mob/verb/Fireball()
src << "Select a target"

client.mouse_pointer_icon = 'select.dmi'
var/mob/target = GetClick()
client.mouse_pointer_icon = null

if(ismob(target))
src.fireball(M)