ID:267017
 
Hi again, can anyone tell me how to make a player have a verb t o crawl, and then stand. So when you crawl your icon changes. If you know how to do this please tell me.
The Conjuror wrote:
Hi again, can anyone tell me how to make a player have a verb t o crawl, and then stand. So when you crawl your icon changes. If you know how to do this please tell me.

Certainly.
mob
var/crawling

verb/Crawl()
crawling=1
icon_state="crawl"
verb/Stand()
crawling=0
icon_state="" // default icon_state

Lummox JR
To add on what Lummox posted:

mob
var
crawling = 0

verb
Crawl()

if(!usr.crawling)//if the crawling var is 0, null, or FALSE
usr.crawling = 1
usr.icon_state = "crawling"
usr << "You begin to crawl"
else
usr.crawling = 0
usr.icon_state = initial(icon_state)
usr << "You stand back up"