ID:173955
 
I have an icon game in which you can define a "custom" building object. My aim is to have three to five of these custom building objects, where the first time you click it, it asks you for a file to use. What I wanna know is, how can I refer to that file every time the player clicks the verb so it just builds it after they define the file?
I think this is like what you want:
mob/var/icon/icon_selection
obj/custom_build_obj
Click()
if(!usr.icon_selection)
usr.icon_selection=input(usr,"Choose an icon.","Custom Build Object")as icon
else
//whatever you want to do with it goes here
In response to Loduwijk (#1)
I'd probably take out the else there, so that it builds the first time you click it as well. Nothing major.
> mob/var/icon/icon_selection
> obj/custom_build_obj
> Click()
> if(!usr.icon_selection)
> usr.icon_selection=input(usr,"Choose an icon.","Custom Build Object")as icon|null
>
> if (!usr.icon.selection)
> //They didn't choose an icon!
> return
>
> //whatever you want to do with it goes here