ID:150241
 
I wanted to know how could I check if a turf has a var when using a verb on that turf.

turf
var
no_fart
mob
verb
Fart()
if(turf.no_fart == 1)//check for the var here
usr << "You cant fart here!"
else
usr << "BLAMMO"
fart_proc()

Thanks in advance.

-Sariat


Sariat wrote:
I wanted to know how could I check if a turf has a var when using a verb on that turf.

> turf
> var
> no_fart
> mob
> verb
> Fart()
> if(turf.no_fart == 1)//check for the var here
> usr << "You cant fart here!"
> else
> usr << "BLAMMO"
> fart_proc()
>

Thanks in advance.

-Sariat



hmm... i think you may need to assign an area like that, not just a single turf... but i'm not sure.
In response to Flynn
Flynn wrote:
Sariat wrote:
I wanted to know how could I check if a turf has a var when using a verb on that turf.

> > turf
> > var
> > no_fart
> > mob
> > verb
> > Fart()
> > if(turf.no_fart == 1)//check for the var here
> > usr << "You cant fart here!"
> > else
> > usr << "BLAMMO"
> > fart_proc()
> >

Thanks in advance.

-Sariat



hmm... i think you may need to assign an area like that, not just a single turf... but i'm not sure.

Yeah, I thought of that, errr actually did that, but it put a big greyish fog thing on the map in my DM.
In response to Sariat
Heres a tip. You can usually find the turf a mob is standing on, by its loc</> variable.

Alathon