ID:261310
 
The coding i did is ok, but nothing appears after you click use and which direction. Heres the coding
obj/items/dog_card
icon = 'card.dmi'
icon_state = "dog"
verb
use()
usr = input("Is your enemy to the east or west","Direction",) in list("east","west")
switch(usr:)
if("east")
usr: = new /mob/dog(locate(usr.x+1,usr.y,usr.z))
usr << "you have called upon the dog card"

if("west")
usr: = new /mob/dog(locate(usr.x-1,usr.y,usr.z))
usr << "you have called upon the dog card"





mob/dog
density = 1
icon = 'animals.dmi'
icon_state = "dog"

All i want to know is why is nothing appearing after they click use and a direction they want.
Deadman Walking wrote:
verb
use()
usr = input("Is your enemy to the east or west","Direction",) in list("east","west")
switch(usr:)
if("east")
usr: = new /mob/dog(locate(usr.x+1,usr.y,usr.z))
usr << "you have called upon the dog card"

Well, there are a few problems in here. I noticed that several times you type "usr:", which shouldn't do anything because the colon doesn't belong there.

The main problem, though, is that you're overwriting usr when you call input(). Try assigning the value of input() to var/answer and the use switch(answer).
One other thing you can do which might help is to change your locate() code to get_step(usr,WEST) (or EAST), which does the same thing but is quicker to write.

Lummox JR
In response to Lummox JR
ok, thanks
In response to Deadman Walking
erm..can you just run that by me one more time, bur makeing it easier.