ID:261447
 
im sorry to bug you all, but how would i make a code to select an icon from your desktop?

and a code to add a midi to the game, for all players to select
In response to Sariat
thanks sariat, but i still need to know how to do the icon change thing so a window pops up and lets you choose an icon from your desktop. actually, more like usable for all people
In response to Branl Starwind
heres an example:
mob
verb
Change_Icon(I as icon)
usr.icon = I

Is that what you want?

-Rcet
In response to Rcet
thats exactly what I wanted, thanks rcet, and do you know how i can do sorta the same thing, but with a midi file?
In response to Branl Starwind
mob/verb/Sound(S as sound)
usr << sound(S)
In response to Nadrew
wow cool thanks Nadrew and everybody else who helped me, I added all your keys to my credits list.

This is the last favor I need, how would I make a lawn mower code that re-places the turfs with another one.

like: I click Mow Lawn, and it triggers to place down short grass icon instead of the regular grass icon. this might be hard I just ordered teh blue book so i wont really be need much more help
In response to Branl Starwind
Branl Starwind wrote:
wow cool thanks Nadrew and everybody else who helped me, I added all your keys to my credits list.

This is the last favor I need, how would I make a lawn mower code that re-places the turfs with another one.

like: I click Mow Lawn, and it triggers to place down short grass icon instead of the regular grass icon. this might be hard I just ordered teh blue book so i wont really be need much more help

Do you actually want to change the turf beneath the player, or do you just want to change the icon?

Changing the icon is easy:

turf/grass
icon = 'unmowed.dmi'
var/mowed = 0

mob/verb/Mow_Lawn()
var/turf/grass/T = src.loc //set T to our loc
if(istype(T)) //check to see if T is of type /turf/grass
// (short for istype(T,/turf/grass), since T
// is already a var/turf/grass)

if(T.mowed) //don't allow the user to mow twice
usr << "The grass is already mowed!"
return //quit from this verb code early

else //if it hasn't been mowed
T.icon = 'mowed.dmi'
T.mowed = 1
usr << "You mow the lawn."
oview() << "[usr] mows the lawn."

else //if it isn't /turf/grass here
usr << "You can't mow that!"


Changing the turf was already answered just a little while ago, and I don't wanna repeat myself, so look back on how to "create turfs" in either Newbie Central or Code Problems.


Oh, and I hate to have to say this, but this is the wrong board. Code Problems is the place to answer questions on the code you already have; if you're asking how to do the code entirely, your best bet is Newbie Central.