ID:266557
Apr 7 2002, 7:57 am
|
|
Im still having trouble Creating a new item then adding its rgb
|
Apr 7 2002, 8:00 am
|
|
http://www.byond.com/hub/Sariat/Clothes
|
In response to Sariat
|
|
mob/Shopkeeper
icon='shopkeeper.dmi' verb/Buy() set src in oview(1) switch(input("What Would You Like?","What")in list("Blue Uniform")) if("Blue Uniform") if(usr.Cash>=100) usr.Cash-=100 usr<<"You Buy the Blue Uniform for 100 Cash You know have [usr.Cash] Cash Remaining!" new/obj/clothes/Blue_Uniform(locate(usr.x,usr.y,usr.z)) else usr<<"You Don't Have Enough Cash!" ok when the user buys the Uniform i want them to be able to selct a color by RGB how would i do this |
In response to Strange Kidd
|
|
Strange Kidd wrote:
mob/Shopkeeperchange that bold part so that its in their inventory. proc/changecolor(r as num, g as num, b as num) src.icon += (r,g,b) That shouldn't work directly. (purposely of course ;)) Edit: Just massage it into your code. |
In response to Sariat
|
|
mob/Shopkeeper
icon='shopkeeper.dmi' verb/Buy() set src in oview(1) switch(input("What Would You Like?","What")in list("Blue Uniform")) if("Blue Uniform") if(usr.Cash>=100) usr.Cash-=100 usr<<"You Buy the Blue Uniform for 100 Cash You know have [usr.Cash] Cash Remaining!" new/obj/clothes/Blue_Uniform(usr) changecolor(/obj/clothes/Blue_Uniform) else usr<<"You Don't Have Enough Cash!" i tired that and it didnt work |
In response to Strange Kidd
|
|
Strange Kidd wrote:
mob/Shopkeeper Try something like that. |
In response to Sariat
|
|
I did that and got
Test.dm:224:error:T:undefined type: T Test.dm:225:error:T:undefined type: T lines 224 and 225 var/obj/clothes/Ble_Uniform/T new T(usr) changecolor(T) bolded areas are where the errors are I also got Test.dm:222:error:usr:bad variable definition Test.dm:222:error:new :invalid variable name: reserved word |