ID:170139
 
Well, I want to make it so you can select your own cursors. Now, I've tried this. But it does'nt seem to work.

mob/verb/Select_Cursor()
set category="Misc."
switch(input("Select a cursor.", "Selecting:") in list ("Cursor (Defualt)","Cancel"))
if("Cursor (Defualt)")
client/mouse_pointer_icon = 'Cursor.dmi'

if("Cancel")
return


The problem is when I try to compile it, it says that it is an undefined var. Is there any way at all to have it so you can select them or not?
I've provided two ways for you to do this, you can allow them to use their own icon for the pointer which is done like:
mob/verb/Pointer()
set category="Misc."
var/a=input(src,"","Pointer:")as null|icon
if(!a)return
src.client.mouse_pointer_icon=a

or the fixed up version of your own:
mob/verb/Pointer()
set category="Misc."
switch(input(src,"Select a pointer.","Pointer:")as null|anything in list("Original","Default"))
if("Original")
src.client.mouse_pointer_icon=null
if("Default")
src.client.mouse_pointer_icon='Cursor.dmi'
In response to Asohtra
Ah, thank you. It worked.
One thing is that your not allowing them to search there file's.


~C
In response to MasterLink2003
MasterLink2003 wrote:
Ah, thank you. It worked.

You're very welcome, good luck. :)