mob
var
user.dither
Dithered = "0"
mob
Person
icon = 'Person.dmi'
icon_state = "Normal"
var
icon
OrigIcon //Can't set it's value here. You have to wait until runtime, when players get their icons.
OrigState = "Normal" //The icon_state can be stored in var/icon/OrigIcon, but we need 2 vars so we can manipulate them seperately.
New()
OrigIcon = new(icon) //Keeping track of the original icon.
verb
Say(msg as text) //Just in case you decide to show this to your friends...
world << "[usr]: [msg]"
world << "\icon [OrigIcon]"
Dither()
//You COULD put usr.icon = usr.OrigIcon here, but then it'd have a few seconds of 0 dither while they choose a new dither.
switch(input(src,"How much dither do you want?","Dither") in list("0","25","50","75")) //Look up switch, if you don't know what it is. Pretty useful.
if("0")
icon = OrigIcon
icon_state = usr.icon_state //Set it back to the original icon.
set 1 = "Dithered"
if("25")
set user.dither "1"
icon = usr.icon
icon_state = usr.icon_state //We don't want the dithers to overlap, do we?
icon += 'Dither25.dmi' //And set the usr's icon.
if("50")
set user.dither "2"
icon = usr.icon
icon_state = usr.icon_state
icon += 'Dither50.dmi'
if("75")
set user.dither "3"
icon = usr.icon
icon_state = usr.icon_state
icon += 'Dither75.dmi'
icon_state = "icon_state"
OrigState = icon_state //Set it so that the new icon_state saves.
mob/verb
Custom_Icon(icon as icon)
set category = "Customize"
var/icon/I = new(icon)
var/list/L = list()
L += I.IconStates()
L += "Blank"
usr.the_states = L
usr.icon = icon
usr.icon_state = O
var/dithered = ("")
if(dithered == "1")
icon += 'Dither25.dmi' //And set the usr's icon.
if(dithered == "2")
icon += 'Dither50.dmi' //And set the usr's icon.
if(dithered == "")
icon += 'Dither75.dmi' //And set the usr's icon.
if(dithered == "0")
return
Problem description:ok dithering did work but i for got to save and i messed it up and when i change icon it dosent set dithering back to what it was. im very new to this so any help would be appreciated
Hiead