i got coding to wear a peace of cloth but i want it so that when u click wear it ive u a chose of how 2 wear it this is what i got so far
obj
akasuki_suit
icon = 'Akasuki Coat.dmi'
layer = MOB_LAYER + 5
verb
wear()
usr.overlays += src
i know i would need a if and else in there some where this is the other icon
icon = 'Akasuki Coat.dmi'
icon_state = "Uchiha"
ID:156211
Dec 5 2010, 1:09 pm
|
|
Dec 5 2010, 3:42 pm
|
|
You can use switch() and alert() or input() to create an interrogative prompt, then just use if() to grab the user's selected choice.
|
In response to Duelmaster409
|
|
it didn't seen 2 work the way i thouge i try this but i don't know whats wrong can u give me a hint
obj akasuki_suit icon = 'Akasuki Coat.dmi' layer = MOB_LAYER + 5 verb wear() switch(alert("How do you wish to wear it?", "Clothing", "Classic", "Uchiha") if("Uchiha") icon_state = "Uchiha" usr.overlays += src where u put "Clothing", was the a mistake or is ti meant to be there i weren't sure because i only want 2 options |
In response to Jamesy577
|
|
There ARE only two options, have you tried to run it? Clothing is the title of the prompt that will appear. If you don't want a title, simply don't make one but don't ignore its presence:
switch(alert("How do you wish to wear it?",, "Classic", "Uchiha") Notice how there are two commas together. Instead of putting text between those two commas I put nothing, which can be accomplished by using an empty string text such as "" or " " |
In response to Duelmaster409
|
|
for some reson it is not wroking it keeps saying that the if part is wrong
|
In response to Jamesy577
|
|
obj These are the problems I saw, I tried it and it worked fine mate. |
In response to Carnage Productions
|
|
yours worked but i am looking at them both and it look the same but there somthing wrong with mine and i dono why thxs for the help
|
In response to Jamesy577
|
|
read the comments on the code mate it explains
|
In response to Jamesy577
|
|
i found out why it was the ) but i use tab and spaces thx u very much
|
In response to Jamesy577
|
|
In dream maker show tabs (you can press CTRL+T for this) is a very useful feature to help that not happen by accident ^_^
|
In response to Carnage Productions
|
|
okay thx
|