ID:175002
Jun 22 2003, 11:01 pm
|
|
I made a icon editor enviroment and i was wondering if theres a way to make a dmi file out of a icon in your game. If you use a turn proc or add overlays and you want your icon to always have this stuff without having to edit every state, so i figured that would be the quickest way to do this. I'm not trying to make some icon steal verb or anything cus thats way easier to do than this...lol
|
In response to Swimmer4LifeH2O
|
|
Thanks a lot this will make icon editing a lot easier.
|
var
turnamt=0
verb
Turn()
turnamt=input("How much would you like to turn your icon?")as num
var/icon/I=new(usr.icon)
usr.icon=turn(usr.icon,turnamt)
usr.icon=I
Save_Icon()
usr.client.Save_Icon()
usr<<"Icon Saved!"
Load_Icon()
usr.client.Load_Icon()
usr<<"Icon Loaded!"
client/proc/Save_Icon()
var/savefile/F=new("players/icons/[usr.ckey]Icon.sav")
F["icon"]<<usr.icon
F["turnamt"]<<usr.icon
F["overlays"]<<usr.overlays
client/proc/Load_Icon()
if(fexists("players/icons/[usr.ckey]Icon.sav"))
var/savefile/F=new("players/icons/[usr.ckey]Icon.sav")
var/icon/newicon
var/turn
var/newoverlays
F["icon"]>>newicon
F["turnamt"]>>turn
F["overlays"]>>newoverlays
usr.overlays=0
usr.icon=turn(newicon,turn)
usr.overlays+=newoverlays
else
usr<<"You do not have an icon saved!"
I have tested this and it works fine! The only thing that didnt work was the turn verb......I'm not to familiar with the turn proc.